Search Unity

Question Animation problems

Discussion in 'Animation' started by KitPolosa, Oct 17, 2020.

?

how to make the character move during animation?

  1. Through script

    1 vote(s)
    100.0%
  2. Through settings

    0 vote(s)
    0.0%
  1. KitPolosa

    KitPolosa

    Joined:
    Sep 21, 2020
    Posts:
    2
    Hello guys. To begin with, I set the roll animation in the animator, indicated it in the script, but in the game itself, the character does not move when the animation is played, as it should. Then I dug into the settings of the animation itself and indicated in the parameters of the Root Motion Node, which is located in Animation / Motion, <Root Transform>. And the character even began to move as needed, but for some reason he constantly returns to the starting point, and the camera still does not follow the model. How to make the character in the game move during playback as indicated in the animation itself, so that he does not return and the camera works as it should? https://yadi.sk/d/lcN9_j9-lIth8A?w=1
     
  2. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    You'll notice in the animator import options that the average velocity and angular speed are 0. Rather than setting your root motion node to the <root transform> I'd add an object to my Maya files and name it something like "root" or "root controller". Animate that through space to represent the direction and orientation of the character. Export it with your animation and select that as your root motion node.

    For example, if your character hips is one 1 unit off the ground so it starts at world 0, 1.0, 0 and animates forward 15.5 units (it would be 0, 1.0, 15.5) The root motion node should have the same forward momentum, but at the ground plane, so 0, 0, 0 to 0, 0, 15.5.