Body shouldn't bounce

Barratator
Posts: 6
Joined: Thu Jun 09, 2011 3:39 pm

Body shouldn't bounce

Post by Barratator »

Hello,
i'm trying to let fall a sphere down a ground. But when both rigidbodys collide, the sphere should NOT bounce a few units in the air again.

I already tried to set the restitution of the sphere and the ground to zero, but it still recoil. :(

What can I do?


Special thanks,
Bastian Born
marios
Posts: 52
Joined: Mon Jul 19, 2010 3:11 am

Re: Body shouldn't bounce

Post by marios »

Try, if this helps:

Code: Select all

dynamicsWorld->getSolverInfo().m_splitImpulse = true;
Barratator
Posts: 6
Joined: Thu Jun 09, 2011 3:39 pm

Re: Body shouldn't bounce

Post by Barratator »

YEAH! It works! :)

Thanks you! =)
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: Body shouldn't bounce

Post by dphil »

Interesting. Does anyone know exactly what m_splitImpulse does and why it fixes that issue?
marios
Posts: 52
Joined: Mon Jul 19, 2010 3:11 am

Re: Body shouldn't bounce

Post by marios »

Glad it worked. m_splitImpulse when enabled removes effect of instant separation of overlapping objects, instead that, we get smooth, slow and not excessive separation
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: Body shouldn't bounce

Post by dphil »

Ah, very good to know! The only way I knew to avoid excessive repulsion before was to set a high linear damping for a rigid body, which obviously is not appropriate for general motion (though in my case happened to be fine). Thanks marios.