Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    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. :)
    OAI01 likes this.