MoveAnimator Script and Root Motion

  • Hi everyone!

    A have a bit of a problem with NPCs following the paths. I use MoveAnimator script to pass speed and direction to a blend tree in an animator controller, which is easy and convenient, but the thing is that it's overriding the root motion. So whenever an NPC reaches a chair and needs to turn around and sit down, it "turns" in place and sits on the opposite of the chair. Is there any way to change the script so it doesn't override the root motion or simply disable the script for the times the NPCs need to sit down?

  • Hello,

    sorry for the delayed response time over the weekend.

    Since the movement is controlled via tweens (DOTween), no root motion can be applied at the same time. The MoveAnimator script only applies the speed and direction of the animation, however it is not responsible for the tween itself.

    If you would like to pause the tween and let root motion take over, you would have to call .Pause() on the movement script which pauses the tween's update routine.

Log in to reply