Tuesday, March 21, 2017

movement - Stopping on a slope in Box2d


I am creating a simple platformer using Box2d. I've implemented a variant of the technique described here.


boxboy, example of the technique I used


To make the player character move more 'platformer-like' I want him to stop on (shallow) slopes.


However, the engine I am using does not support angle-joints, so I have trouble restricting the movement of the wheel. I've tried some different alternatives that not worked: Setting the horizontal velocity to 0 every game loop doesn't seem to work, because between calls the wheel catches up speed once again.


Is there another way to fix this?




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...