Rigidbodies shake/wigg when deleting distant constraints

catchyid
Posts: 15
Joined: Thu Jul 30, 2015 2:12 pm

Rigidbodies shake/wigg when deleting distant constraints

Post by catchyid »

[Update: I found the problem! there were too much deep penetrations between intersecting constrained rigidbodies (and I disabled collision between constrained rigid bodies), so once these constraints are removed the collision solver pushes away intersecting rigidbodies, hence causes many rigidbodies to wiggle until they stabilize again (i.e. collision resolved, and no more intersections)]

Hi,

First of all, happy holidays :D hope everyone is enjoying his/her time...

I have ~1800 btRigidbody constrained with ~4000 constraints of type btGeneric6DofSpring2Constraint. When I remove some constraints , using tDiscreteDynamicsWorld::removeConstraint(btTypedConstraint* constraint), some distant rigidbodies start shaking/wiggling for about 3 seconds although they have constraints as well, however eventually they stabilize again and stop moving hence satisfying their constraints. It's important to say that these are distant rigidbodies, they are not connected directly by any rigidbody/constraint I am manipulating (but indirectly they are connected through intermediate rigidbodies and constraints)...

As a workaround I increase bullet substeps and the problem eventually disappeared, but I am wondering: why it happens in the first place (i.e. is it a numerical problem, my step size is too big to start with)? FYI, I set bullet fixed frame rate to 1/24 (i.e. each tick ~0.0417 sec) and to fix the problem I use 5 substeps in each tick such that effectively each tick would be ~0.0084 sec instead.

I know, this is a very generic question, but I hope someone would give me just some pointers...

Thanks,