Can't rotate transform under animator control

Hi, everybody!
I’m running into a problem rotating a gameObject while it has Animator attached and enabled. When Animator is disabled I can rotate object just fine. ‘Apply Root Motion’ option in animator is disabled and every AnimationClip has Root Transform Rotation based upon original.
This makes it really hard to control object rotation from script.

If you want to control the root object rotation by script, simply create a monobehaviour and override OnAnimatorMove()

If you want to control any other transform rotation in the hierarchy you need to do it in LateUpdate() which is called right after the animator write to properties step

5 Likes

Thanks! But the problem actually was one of the animation was rotating root transform. After removing this animation transform can be rotated just fine.

3 Likes