I've been playing around with Erin Catto's Box2D code to see if I can adapt it for use in a platform beat-em-up I'm working on. I added support for circles and ellipses and everything is going very smoothly so far. However, I've run into problems with friction.
Imagine a long flat box representing the ground and a sphere representing the player. If the player runs along the ground and jumps, when he lands (the sphere collides with the box) he gets stuck for a second because of friction. I believe this is happening because of the accumulated normal impulse.
Any tips on what I could alter to prevent this from happening?
Box2D question
-
- Posts: 316
- Joined: Fri Jul 01, 2005 5:29 am
- Location: Irvine
-
- Posts: 8
- Joined: Wed Nov 29, 2006 12:36 am
Thanks for the reply. I have another question. I want to implement a simple distance constraint in the same style as the Box2D code. This constraint should prevent the distance between 2 rigid bodies from exceeding some chosen value. I don't want the constraint to effect the angular velocity of the bodies. Could someone give me a quick description of how to implement this using impulses?
-
- Posts: 4
- Joined: Sat Jan 13, 2007 2:03 pm
-
- Posts: 8
- Joined: Wed Nov 29, 2006 12:36 am