Trying to damp velocity impulse for contact constraints

nanocell
Posts: 8
Joined: Mon Jan 18, 2010 1:34 pm
Location: Sydney, Australia

Trying to damp velocity impulse for contact constraints

Post by nanocell »

Hi all,

I'm trying to figure out how to achieve the following, assuming of course that it's even possible (but it seems like it should be). Oh, I'm using the standard issue btDiscreteDynamicsWorld.

I have a kinematic object that moves relatively fast and upon colliding with dynamic objects they (dynamic objects) gets kicked all over the scene. I have managed to relieve this problem to fair extent by enabling split impulse, increasing the rigid bodies' linear factor, zero restitution, and even a little bit of linear damping but the collision's velocity impulse is still too big. Increasing the fixed substep to 1/240 makes it even worse.

What I want is to let Bullet apply the penetration impulse from the contact constraint but only a very small factor of the velocity impulse, or maybe even a zero velocity impulse. I have tried to set the velocity impulse to zero in various places in the btSequentialImpulseConstraintSolver, just to test whether it could be done, but it either had no effect or the objects started jittering uncontrollably.

So, does anyone have any ideas on how can I get my pile of dynamic rigid bodies to successfully collide against the kinematic object but scale the velocity impulse?

Thanks,
Van Aarde.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Trying to damp velocity impulse for contact constraints

Post by Erwin Coumans »

The split impulse option is exactly designed for this purpose. Does it have any effect for you?

There should be no resulting velocities due to penetration correction, when split impulse is enabled.
Perhaps the velocity of the kinematic object is carried over?

Thanks,
Erwin