Hello!
There are quite a few opinions and approaches on how to create retro-style jump'n'run dynamics. I now want to focus on the issue of a slight slope that is supposed to not affect your character's movement speed (i.e. walking up should not slow you down).
I found some solutions to that, that do not really satisfy me (basically, use abnormal friction and gravity).
I am also well aware of the fact that box2d is not intended to feature this unphysical behaviour out of the box.
The question then is, of course, whether to use box2d at all and if so, how to trick it.
Long story short: I want to pose a simple question.
Is there a way to manipulate the properties of a contact between two fixtures so that box2d solves the "wrong" problem?
With respect to my slope issue I would then simply catch the PreSolve event and tell box2d that there is in fact no edge with increasing height, but instead there is a flat edge to collide with (at the height where to overlap takes place).
The result would then still need a little shift in the height coordinate.
I would consider such a solution an acceptable way to trick box2d.
Any help and remarks appreciated.
There are quite a few opinions and approaches on how to create retro-style jump'n'run dynamics. I now want to focus on the issue of a slight slope that is supposed to not affect your character's movement speed (i.e. walking up should not slow you down).
I found some solutions to that, that do not really satisfy me (basically, use abnormal friction and gravity).
I am also well aware of the fact that box2d is not intended to feature this unphysical behaviour out of the box.
The question then is, of course, whether to use box2d at all and if so, how to trick it.
Long story short: I want to pose a simple question.
Is there a way to manipulate the properties of a contact between two fixtures so that box2d solves the "wrong" problem?
With respect to my slope issue I would then simply catch the PreSolve event and tell box2d that there is in fact no edge with increasing height, but instead there is a flat edge to collide with (at the height where to overlap takes place).
The result would then still need a little shift in the height coordinate.
I would consider such a solution an acceptable way to trick box2d.
Any help and remarks appreciated.