Restitution

Jack
Posts: 59
Joined: Thu Aug 31, 2006 11:51 am

Restitution

Post by Jack »

I noticed that if you set high Restitution, objects become unstable. They can not lie calmly! Even with Friction=1 they are dancing...
In appCcdPhysicsDemo add to localCreateRigidBody:

Code: Select all

body->setRestitution(1);
body->setFriction(1);
I can not create wall of objects with high Restitution.
:cry:
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Restitution

Post by Erwin Coumans »

Jack wrote:I noticed that if you set high Restitution, objects become unstable. They can not lie calmly! Even with Friction=1 they are dancing...
In appCcdPhysicsDemo add to localCreateRigidBody:

Code: Select all

body->setRestitution(1);
body->setFriction(1);
I can not create wall of objects with high Restitution.
:cry:
Indeed. Right now, Bullet uses a penetration depth correction that adds a bit of energy to the system. When this is combined with too much resititution, this leads to issues. This can be improved in future version, one approach would be using the 'split impulse' idea, which means that the impulse necessary to correct penetration depth recovery is kept separate and doesn't affect the resulting velocity of the rigidbody.

There are other limitations that can lead to instability, and these should and will be documented. So avoid using too large restitution, large mass ratios (don't stack too heavy object on a very light object), large collision shapes and tiny collision shapes (<0.2 units) etc.