by Michael Buckley » Sun Jun 22, 2008 11:32 pm
You know what, I was a little sick when I wrote that last post. Still am. I got the idea halfway there. Yeah, normally you'd need to reset the position of the body in the second space. That would screw things up. But, if you can't move the body to the location you need, move the location you need to the body. Aha, so, this is tricky. But, let's say that, for example, your window is 200 wide. Each space would then be 100 wide. Well, the space doesn't have an intrinsic width, but when an object in a space goes past 100, it's added to the other space. So, what you do, is the right side will range from 0-100, and the left side will range from 100 to 200. Then, let's say you have an object 10 wide in the right space. If it's at location 95 in the right space, it will be 5 wide in each space. What you do is you put it at location 95 in each space, but you draw the left space starting at 100, so only the right half of the object shows coming on the screen on the left. Then you'd have to adjust properly so that images move off the left side when x < 100 or x > 200, as opposed to the x < 0 or x > 100 for the right side.
I think that makes sense.