Springs with btGeneric6DofSpring(2)Constraint not working

Post Reply
M. Winter
Posts: 1
Joined: Fri Nov 03, 2017 7:42 am

Springs with btGeneric6DofSpring(2)Constraint not working

Post by M. Winter » Fri Nov 03, 2017 8:01 am

I am modeling springs/rubberbands (of equilibrium length zero) with Bullet Physics using the constraints btGeneric6DofSpringConstraint and btGeneric6DofSpring2Constraint.

Using btGeneric6DofSpringConstraint the physics works fine except that no daming applies. I read this can be fixed using the newer version of the constraint.

However, using btGeneric6DofSpring2Constraint, the damping is fine but now the physics is off as soon as the spring is no longer attached to the bodies centers of mass (which I need for my application). The stiffness of the connection seems to vary heavily depending on the relative orientation of the bodies, and finally the system explodes. I assumed that the local frames frameInA and frameInB are used as for any other constraint (especially it works with btGeneric6DofSpringConstraint or if both frames have origin (0,0,0)).

What I am doing wrong? What are the things I have to know about these constraints that I am missing. What is the big difference between btGeneric6DofSpringConstraint and btGeneric6DofSpring2Constraint anyway?

By the way, I provided the code on StackOverflow: https://stackoverflow.com/q/46972024/7920139
But my code seems not to be the problem, especially because the physics works fine with the older version of the constraint.

Post Reply