I got a walking character which falls down because of gravity. However when it walks off a ledge, the character rotates. this is because half of the body is in the air and half of it is on the ledge (another body). Is it possible to not apply gravity until the character is completely off the ledge?
or maybe there is a different solution to this problem?
Well the b2BodyDef has the fixedRotation
field which if true prevents the body from rotating.
Similarly the b2Body class has a SetFixedRotation
method if you need to turn this off and on at runtime.