Search Unity

Animator moving body center between blends

Discussion in 'Animation' started by andrew210, Nov 25, 2019.

  1. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Hello!



    I'm having a problem where between motions in a blend tree or transitions on the animator in general it will shift the whole body (in this case our horse) off to a position that it shouldn't be into . I haven't been able to figure out whats causing this issues and only found hacky work arounds to sort it:

    - This hasn't always happened, we recently updated our animations, but still no idea why anything that changed would cause this behaviour
    - We can "fix" it but toggling on and off apply root motion a bunch of times
    - The horse is created as a child game object, then its animator and avatar for the animator are copied into the parent (and the original animator is removed)

    I've looked into things like using Rebind(), WriteDefaultValues and even adding hacky bits of code to keep toggling on and off root motion but any ideas as to what is going wrong here and potential ways of fixing it would be greatly appreciated.