Need to transfer parent rotation to child.

This commit is contained in:
Andrzej Kapolka 2014-04-18 15:09:37 -07:00
parent 6add0dfb42
commit 743034c986

View file

@ -1017,6 +1017,7 @@ void Model::applyRotationDelta(int jointIndex, const glm::quat& delta, bool cons
if (propagate && targetRotation != state.combinedRotation &&
joint.parentIndex != -1 && geometry.joints[joint.parentIndex].isFree) {
applyRotationDelta(joint.parentIndex, targetRotation * glm::inverse(state.combinedRotation), true, true);
state.combinedRotation = _jointStates.at(joint.parentIndex).combinedRotation * state.rotation;
}
}