RigidBody-Constraint system: teleporting problem

Post Reply
sulbon
Posts: 1
Joined: Thu Mar 14, 2013 7:19 am

RigidBody-Constraint system: teleporting problem

Post by sulbon »

Hi all

I am a programmer and has recently intergreted bullet engine in our game.

Here is the situation:
We created a couple of RigidBodys(both kinematic and dynamic) and linked them with Constraints( btGeneric6DofSpringConstraint ) for some simplified cloth simulation.
The system go wrong when we suddenly move all the RigidBodies for a same long distance ( We move the bodies by calling both btRigidBody::setTransform and btMotionState::setTransform ) . We thought that if we keep the relative offset of the RigidBodies, the elastic constraints between them will act the same like the bodies has not moved, but the fact proved the expectation wrong. The bodies move quite unstably.
We checked the Debugdraw. And we have two guesses that might explain.
1: the constraints' internal status is not updated when we manually move the bodies. The constraints still think the bodies are quite far away and apply a very large force on the bodies, and make the simulation unstable.
2: the manual move of dynamic bodys results in large feedback force.

The question is: which guess is right, and what, in your opinion, is the right way to solve the problem?
Post Reply