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.
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. :)
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.
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.
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.