Page 1 of 1

ConeTwistConstraint SetMotorTarget

Posted: Mon Mar 25, 2013 10:36 pm
by Dr.Shepherd

Code: Select all

void btConeTwistConstraint::setMotorTarget(const btQuaternion &q)
 {
         btTransform trACur = m_rbA.getCenterOfMassTransform();
         btTransform trBCur = m_rbB.getCenterOfMassTransform();
         btQuaternion qConstraint = m_rbBFrame.getRotation().inverse() * q * m_rbAFrame.getRotation();
         setMotorTargetInConstraintSpace(qConstraint);
}
I don't understand how this function sets the target angle, and definitely I am missing out some fundamental mechanics knowledge here. If anyone could explain this or throw me some links would be useful.

Thanks in adance.