Root motion position might not be set correctly
albertomelladoc opened this issue · 0 comments
albertomelladoc commented
Hi!
I have found another possible issue. This one is related to rootmotion. In the line 451 of AnimationInstancingMgr. It won't be an issue for everyone, but since the position of the animationInstance is calculated with a localPosition setting it with the methodSetPositionAndRotation might not deliver the expected results, moving the character even with idle animations. Using SetLocalPositionAndRotation instead would be best.
Like this:
#if UNITY_5_6_OR_NEWER
instance.worldTransform.SetLocalPositionAndRotation(localPosition, localQuaternion);
#else
instance.worldTransform.localPosition = localPosition;
instance.worldTransform.localRotation = localQuaternion;
#endif
This fixed the issue for me. Hope it helps someone!