I am talking about moving at a constant velocity when you press the left/right keys, moving up/down on slopes at exactly the same way as on horizontal surfaces, and simple jumps.
I tried playing with friction, gravity, using impulses or setting velocity directly.
The issue is, no matter what I do, something works physically correct, which isn't really what I want.
If friction is set to 0, and the velocity is set directly (if left is pressed, move left, if right is pressed, move right, if neither is pressed, set to 0), the player moves correctly on horizontal surfaces, but would slip on curves for some reason, jump when stopping to move upwards (still there is still velocity in the Y axis), and jump sideways when starting to move downwards, still gravity doesn't catch up immediately.
If friction is set to 1, and the velocity is set directly (as above), the player doesn't slip from slopes, but still jumps upwards and sideways when stopping to move while going upwards or starting to move while going downwards respectively.
In addition, the payer gets stuck while going against a wall to his sides, but that can be solved by checking if he is in the air or not.
If friction is set to something very high, and I use very large impulses instead, while controlling manually the maximum velocity that the player can get to, then the player can't go up slopes (even the tiniest one) - he just gets stuck in place, and he also moves very fast when in the air (but this, again, can be controlled by checking if the player is in the air or not).
Is there a decent way to get the feeling of old platformers, or is Box2D not suitable for this?
Edited by wolfscaptain, 26 July 2012 - 02:13 PM.