Physics Camera
Posted: Fri Mar 22, 2013 2:45 am
Hey all,
I am trying to make a nice terrain using rectangles/polygons - not one of those blocky terrains.
I have a whole Instance system set up so that I can easily modify each of my registered blocks to make that terrain, by setting values like part.Size = Physics.NewSize(32, 32)
Anyhow, I've gotten the parts rendered on screen, and fixtures/bodies created for their shapes. But I want to make a camera now, that can move left/right, to see more of the terrain past screen limits.
This is what I'm thinking: If I were to simply make an offsetX and offsetY, and add them to the rendering positions of the shapes, their bodies would still exist in the old spot. Falling objects, for example, would "render" in their right position when the camera moves, but their bodies will be falling in their old position.
Can someone please explain a good way to go about making a camera? o.e!
I am trying to make a nice terrain using rectangles/polygons - not one of those blocky terrains.
I have a whole Instance system set up so that I can easily modify each of my registered blocks to make that terrain, by setting values like part.Size = Physics.NewSize(32, 32)
Anyhow, I've gotten the parts rendered on screen, and fixtures/bodies created for their shapes. But I want to make a camera now, that can move left/right, to see more of the terrain past screen limits.
This is what I'm thinking: If I were to simply make an offsetX and offsetY, and add them to the rendering positions of the shapes, their bodies would still exist in the old spot. Falling objects, for example, would "render" in their right position when the camera moves, but their bodies will be falling in their old position.
Can someone please explain a good way to go about making a camera? o.e!