Adding Joint Makes Collison Spongy (Sequential Impulses)
Posted: Sat Dec 30, 2006 11:17 pm
I'm using sequential impulses for my 2d engine. Most the code is very similar to Erin Cattos sequential impulse paper.
I've notice when I add revolute joints between bodies the collision of the connected bodies with other bodies becomes spongy.
Example: If I make a car and attach 2 wheels using revolute joints, then place the car on a static body the wheels sink into the body more than if the bodies were not attached by a joint. I noticed it only occurs when the force is acting from one body, thru the joints, and into the second body. In this case, the second bodies collision with the underlying static body will lose a lot of it's rigidness.
The only thing I found to counter this is to swap the order in which I apply collision response impulses and joint correction impulses. If I do collision impulse first and joint correction second, I get the spongy behavior. If instead I do the joint correction first, I do not see the spongy behavior.
So, my question is does it matter in which order I do these? Is one way better than another. (for me it is, but I could have something else wrong.)
-thanks.
I've notice when I add revolute joints between bodies the collision of the connected bodies with other bodies becomes spongy.
Example: If I make a car and attach 2 wheels using revolute joints, then place the car on a static body the wheels sink into the body more than if the bodies were not attached by a joint. I noticed it only occurs when the force is acting from one body, thru the joints, and into the second body. In this case, the second bodies collision with the underlying static body will lose a lot of it's rigidness.
The only thing I found to counter this is to swap the order in which I apply collision response impulses and joint correction impulses. If I do collision impulse first and joint correction second, I get the spongy behavior. If instead I do the joint correction first, I do not see the spongy behavior.
So, my question is does it matter in which order I do these? Is one way better than another. (for me it is, but I could have something else wrong.)
-thanks.