Search Unity

Root Motion does not Update Parent?

Discussion in 'Animation' started by jmguillemette, Apr 28, 2019.

  1. jmguillemette

    jmguillemette

    Joined:
    Mar 4, 2015
    Posts:
    53
    Likey a noob question but here goes :)

    I have a GameObject that is my character.
    Under it is a model object that contains the model to be used for this character.

    All movement and physics logic is at the parent level object

    All animation logic are on the child model object along with the animator.


    Everything works great.. until....

    For a subset of animations, I would like to leverage root motion for. Via script, I enable root motion on the animator. What I see happening is the parent object remains in place.. (does not move .. ) but the child object moves further and further away from its parent. ( the parent object is effectively left behind along with all its colliders and other logic )

    There does not appear to be a good way to tell an animator to update the parent level object.

    So does this mean my animator MUST always be at the parent level to use root motion?
    or have I missed something in my research?

    Thanks
    j
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Yep, that's unfortunately how it works.

    Other than setting it up with the Animator on the root, you could try using a script to steal any movement from the model every frame and apply it to the root instead.