// Update rotation of all known joints public virtual void Update() { foreach (JointType jt in knownJoints.Keys) { // the applyRelativeRotationChange function returns the new "local rotation" relative to the RootTransform Rotation... Quaternion localRotTowardsRootTransform = MoCapAvatar.applyRelativeRotationChange(jt, initialModelJointRotations[jt]); // ...therefore we have to multiply it with the RootTransform Rotation to get the global rotation of the joint knownJoints[jt].rotation = RootTransform.rotation * localRotTowardsRootTransform; } }