Got that backwards.

This commit is contained in:
Andrzej Kapolka 2014-04-23 11:55:16 -07:00
parent 523498ee5b
commit 09bb51261a

View file

@ -925,12 +925,13 @@ bool Model::setJointPosition(int jointIndex, const glm::vec3& translation, const
glm::quat combinedDelta;
float combinedWeight;
if (useRotation) {
combinedDelta = rotation * glm::inverse(endRotation);
combinedWeight = 1.0f;
} else {
combinedDelta = safeMix(rotation * glm::inverse(endRotation),
rotationBetween(jointVector, relativePosition - jointPosition), 0.5f);
combinedWeight = 2.0f;
} else {
combinedDelta = rotationBetween(jointVector, relativePosition - jointPosition);
combinedWeight = 1.0f;
}
if (alignment != glm::vec3() && j > 1) {
jointVector = endPosition - jointPosition;