Is there some way with a btGeneric6DofSpringConstraint to determine at what point it is at on an axis used as a spring?
For Example, using Axis 2 if you set the following:
springJoint.enableSpring(2, true)
springJoint.enableStiffness(2, someValue)
springJoint.enableDamping(2, someValue)
springJoint.setLinearLowerLimit(0.0, 0.0, 0.0)
springJoint.setLinearUpperLimit(0.0, 0.0, 0.5)
While the spring is moving within the limits of 0.0 to 0.5 how can I tell at what point between those values it is at?
btGeneric6DofSpringConstraint Spring Position
-
- Posts: 73
- Joined: Tue Oct 06, 2009 3:19 pm
-
- Posts: 21
- Joined: Mon Feb 11, 2013 1:57 pm
Re: btGeneric6DofSpringConstraint Spring Position
Hello,
I think you might get some kind of information from the TranslationalLimitMotor. You could try something like this:
Hope this is what you need.
I think you might get some kind of information from the TranslationalLimitMotor. You could try something like this:
Code: Select all
btVector3 currentLinearDiff = constraint->getTranslationalLimitMotor()->m_currentLinearDiff;