I have a basic platformer using Box2d that works great. However, I now want to stop using my default square, and implement some running and jumping animations.
How can I ensure that:
- When running, the speed of the running sprite is correct with the current player speed, as to prevent the sprite from 'moonwalking'.
- When jumping, play the correct frames at the right moments? I imagine I need to check the vertical velocity and if this is zero again while jumping I'm at the highest point, but how do I track where to initiate the landing animation?