I had in mind a simple side scrolling platformer game. I’ve struggled using ODE physics as a basis for the gameplay and have a bunch of questions I couldn’t really find an answer to due to lack of samples here or on other sites:
- Is it possible to change the axis of OdePlane2dJoint? It appears to assume XY as default.
- I’m currently applying Force in a keypress task to move my character, but this quickly leads to accelerating movement and sluggish response in changing direction. I could go around this by forcing setLinearVel to zero(s) but then I’d have to keep redefining gravity as part of that function call which doesn’t sound right (setLinearVel(0,0,0) negates gravity too)
- What’s the best way to prevent unwanted rotations? I’m using a box for the character and he can rock back and forth on edges when he should be static rotation wise.
So in a nutshell the physics should adhere to the classic platformer behaviour introduced in games like Super Mario, but forcing this kind of behaviour seems to be tricky. Using ODE might be slightly overkill for this, but I wanted to give it a shot since it does allow me to bypass a lot of manual collision handling.