Search Unity

Humanoid animation not working properly

Discussion in 'Animation' started by laur-ganta, Mar 9, 2015.

  1. laur-ganta

    laur-ganta

    Joined:
    Oct 22, 2014
    Posts:
    24
    Hello. I recently started using blender (so I can make my own models and animations) and made a "dodge animation" for a humanoid character i created and I imported it in Unity 5 and everything works smooth except this animation.

    I used the third person controller from standard assets and created a new state for the dodge animation, that transitions from grounded blend tree when a trigger is set.

    The problem is that the character rotates around too much and the animation is inconsistent with the preview while in game.

    Preview: http://giphy.com/gifs/preview-l0O9zCpUgbHeBXT4Q
    In game: http://giphy.com/gifs/actual-xTiTnp1kpAyEIXp2r6

    I tried changing the animation's root transform rotation and position from the fbx file and didn't help.

    Can someone please help me understand what is going on? Thank you.
     
  2. laur-ganta

    laur-ganta

    Joined:
    Oct 22, 2014
    Posts:
    24
    If you look closely at the indicator below the character you can see it rotating around too much. I am sure that is related to my problem, but no matter how much I searched, I couldn't find anything that can help me fix this.

    http://giphy.com/gifs/3o85xFQNem900tJIqs

    Please help, someone!

    Thank you!
     
  3. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Can you log a bug with your project?

    Send me your case number when you get it and I will take a look.
     
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    It kind of looks like the animation contains both root bone rotation as well as hip counter rotation.
    Is the pelvis/hips bone and root node/bone rotated/moved also?
     
  5. Braza

    Braza

    Joined:
    Oct 11, 2013
    Posts:
    136
  6. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
  7. Braza

    Braza

    Joined:
    Oct 11, 2013
    Posts:
    136
  8. Braza

    Braza

    Joined:
    Oct 11, 2013
    Posts:
    136
    Hey thanks! This worked even better. Not sure why do I nned to bake root motion if these fbx's have no root motion as per description... But that worked. I was like newbie C++ coders that jsut placing * and & randomly until it works :)
     
  9. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Ha! That's one way to work. :)
    The reason is detailed in the animation section of the tutorials topic. I can't remember which one, but it's good to go through them all anyway. I've watched each one proly about 142 times. :)

    Glad you figured it out.