Search Unity

Velocity does'nt work with Root Motion Enabled

Discussion in 'Animation' started by firifire, Jan 4, 2019.

  1. firifire

    firifire

    Joined:
    Mar 1, 2018
    Posts:
    1
    So i am working with 2D Animation. Just started using Root Motion so I am not sure if I am doing something wrong or its a bug.

    Just for one of the animation of a character I control the Position to animate the characters entry.
    For it to work I enabled Generate Root motion on the file and the Root Motion on character's animator.

    This works fine at runtime. But when i use rigidbody2D.addforce on the character. The X Velocity for some reason resets to 0 after 4 frames and the Y velocity although with a late start some how works.

    If I remove position change from the anim file and animator's have root motion enabled, the issue remains the same

    If I have any anim with position change in it and the animator's root motion is disabled. The character cant even be moved manually during runtime.

    Works fine with not postion change in aim and root motion disabled.

    I am using Unity 2018.2.20f
     
    Last edited: Jan 4, 2019