User Tag List

Results 1 to 6 of 6

Thread: Moving a camera object

  1. #1
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Mantis's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Moving a camera object

    The solution to this is probably very simple. I most likely either missed something obvious out, or I just haven't tried anything like this before. Okay, so I've got a frame which has the same height, but a little over three times the width of the size of the window. I created a camera object. It's an active object which is centered on.

    I created a global value for different states.

    1 = Move to left

    2 = Move to middle

    3 = Move to right.

    If the state is 1, then every 1/100 of a second (I think) the camera moves -60 pixels on the X axis until it hits a detector. For 3, it is the same but with +60. As for 2, if X of the camera is greater than the middle detector's X value, then it moves -60, and otherwise, +60.

    The problem is, because it's moving in such a skippy manner (hopping sixty pixels at a time) when it hits the detector it doesn't center on it properly, and sometimes misses the detector entirely. I'd try making it move less pixels at a time, but there doesn't seem to be a way to measure the timer at less than 1/100 of a second. Sorry if this is confusing, as it's not easy to explain, but can you suggest anything?

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    California, USA
    Posts
    1,247
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Moving a camera object

    Are the actual dimensions of your frame set so this "skipping" measures out evenly.

    Example: Window is 200 pixels wide, Frame is 600, start position of centered object would be 100. Your skipping effect would cause the centered object to be placed at the following locations.

    100
    160
    220
    280
    340
    400
    460
    520

    As you can see this would not be centered on the far left side of the frame because this would need to be 500. (half of the windows width. To fix this example I would make the frame size 620 wide.
    DT
    Special Projects Director

  3. #3
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Mantis's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a camera object

    Hm, you're right. I didn't think of it like that. So, I've got to position the objects in a way so their X co-ordinates are multiples of sixty (or whichever number I use)? It may not be that simple though, as I want the camera to move EXACTLY to the middle, not just a little bit off.

    Also, there's a graphic that stretches all the way across. The frame must be this size. (As I don't have the source with me I can't show you right now). If you have ever played Phoenix Wright, you'll know what I mean. The left is the defence, the middle is the witness stand, and the right is the prosecution.

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    California, USA
    Posts
    1,247
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Moving a camera object

    Can you adjust the skip distance to an interval that is evenly spaced (or within a very small number) in the frame?

    Using my example above you would be 20 pixels. You could skip 57 frames each time giving the following positions.

    99
    156
    213
    270
    327
    384
    441
    498

    In this example you would be 1 pixel off center on the far left and 2 pixels on the far right. Of course your numbers will be different and ultimately this may not work for you if you have a background that requires an exact distance of 60 pixels.
    DT
    Special Projects Director

  5. #5
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a camera object

    If you really need a skip distance of 60 pixels, you can continually move 1 pixel in a fastloop repeated 60 times, and cancel the loop when the camera object collides with either of your detectors.

  6. #6
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    California, USA
    Posts
    1,247
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Moving a camera object

    Moving the location is not the issue I believe. Its that the object is not centered on the display once you hit the far right edge of the Frame.
    DT
    Special Projects Director

Similar Threads

  1. Camera Object
    By Atrox in forum iOS Export Module Version 2.0
    Replies: 7
    Last Post: 22nd May 2012, 08:53 PM
  2. Camera object dev only?
    By Ryan in forum iOS Export Module Version 2.0
    Replies: 4
    Last Post: 1st February 2012, 01:28 AM
  3. Smooth scrolling with moving camera.
    By Popcorn in forum File Archive
    Replies: 0
    Last Post: 31st August 2009, 08:10 PM
  4. Camera object
    By Fingerhand in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 28th March 2009, 04:57 PM
  5. Camera Object
    By Novabrain in forum Extension Developers Lobby
    Replies: 3
    Last Post: 6th January 2007, 06:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •