However the btGeneric6DofSpringConstraint does not seem to rigidly lock rotation, even after setting the spring to false and setting the lower and upper limits.
Under force, the constraint will still rotate and spring back to the starting position, is it possible to prevent any rotation from occurring on the constraint?
e.g
Code: Select all
// Create suspension constraint
btGeneric6DofSpringConstraint *spring = new btGeneric6DofSpringConstraint(
*bodyA, *bodyB,
btTransform(btMatrix3x3::getIdentity(), btVector3(1.1, -1, 2)),
btTransform(btMatrix3x3::getIdentity(), btVector3(0.f, 0.f, 0.f)),
true);
// Attempt to lock constraint rotation
spring->enableSpring(3, false);
spring->enableSpring(4, false);
spring->enableSpring(5, false);
spring->setAngularLowerLimit(btVector3(0.f, 0.f, 0.f));
spring->setAngularUpperLimit(btVector3(0.f, 0.f, 0.f));
