Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Character rotation with root motion

Discussion in 'Animation' started by Milten2222, Oct 26, 2018.

  1. Milten2222

    Milten2222

    Joined:
    Nov 14, 2017
    Posts:
    7
    I am trying to make a character controller, which would use root motion in order to move around in the game world. Thing is, my character has a Generic set of animations. I have checked out Unity Standart Assets third person controller, and it has Humanoid animations. Some asset store assets and the new FPSSample project from Unity have Humanoid animations as well. While previewing their Turn animations I have noticed, that when animation is ended, character keeps his new rotation and keeps rotating further (so he rotates from 0->90, 90->180, 180->270...). But in my case character does not keep new rotation and each time Turn animation is being played, character rotates from it's original position (so it's always 0->90).

    So my questions is: do I have to use Humanoid animation to make rotation from root motion persist? Or I can use Generic animation as well, but something is probably wrong with the animation itself?
     
  2. PlayingKarrde

    PlayingKarrde

    Joined:
    Aug 19, 2013
    Posts:
    28
    Generic animations are perfectly fine. Make sure Use Root Motion is checked on your animator. Also make sure that you are not baking the root node in the Y rotation. Another thing to check is that you are setting the correct node for root in the Rig tab.

    Finally, also make sure that your animations actually have root motion (the root bone is actually animated to move in a direction).