Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Strange Rotation when using Humanoid Avatar

Discussion in 'Animation' started by Mehd, Jun 3, 2018.

  1. Mehd


    Apr 29, 2016

    I created a character with a rig that fits into Mecanim so I can use IK control in-game. Problem is, when I play some animations, namely run for now, my character both:
    • Seems to have some root movement, while I don't think I enabled it.
    • Which makes it turn (ie: it is not facing the direction I left it in when I pressed play.
    Could somebody point me my error ?

    Here's a small video to see the problem:

    Thanks a lot !
  2. Ermiq


    May 1, 2018
    I'm a noob, but I have some thoughts and I would be glad to help.
    Check your animation keys. Maybe your animation rotation keys rotate bones relative to global coordinates instead of local coordinates.
    Open your animation file in Project window and try out different settings in Inspector. Especially "Transform root rotation" settings. But first you should check if your animation keys are correct.
  3. MrDude


    Sep 21, 2006
    Sorry, it's been years since I had this problem so I don't recall the exact solution but if memory serves this was due to the animation you are using not facing forward in it's starting frame. the root node might be slightly rotated during the idle pose for instance.

    In this case you want to toggle between using the root orientation of the animation and the root orientation of your character. Click on the animation and then in the inspector look for this:

    Try both options and then try baking the rotation into the pose. I THINK that was it, but I could be wrong.
    Hope that helps. :)