Box2D scrolling?
BlitzMax Forums/Brucey's Modules/Box2D scrolling?
| ||
Does Box2D (or chipmunk or farseer) support sidescrolling by default? If they don't, could anyone please point me in a direction that will help me with sidescrolling? |
| ||
Without knowing more I am going to assume that what you need is to disconnect your screen positions from your physics positions. Try creating a screen offset variable that you add to any drawing positions, you can then change that offset to make things draw shifted by the offset value. Think of physics positions as real positions and drawing positions as points relative to the "camera". |
| ||
Ah, thank you. |
| ||
Yes that is how it's done. The physics world does not move, but your offset drawing positions do. |