Search Unity

Idle Animation To Turn Animation Misaligned

Discussion in 'Animation' started by SeahorsePro, Jan 18, 2020.

  1. SeahorsePro


    Mar 31, 2018
    I am using a few turn animations from Mixamo that work perfectly to rotate my character 90 degrees using root motion. The issue is transitioning from my idle animation to my turn animation which creates an offset around 45 degrees so the character never makes the full rotation to face the desired position. I have determined that it is the idle animation creating the offset by removing the idle animation and transitioning from an empty state to the turn animation. I am trying to determine what it could be within the idle animation that is causing such a large offset since the idle animation is facing forward perfectly 90 degrees perpendicular from the turn animation. I have tested this by adding an empty game object attached to the spine of the model and creating a raycast in it's forward vector.

    I'm probably just being stubborn and will have to disable root motion for turning and use a Slerp method or perhaps keep the root motion and figure out a way to update the characters rotation after the turn animation plays since baking root transform rotation aligns the vectors correctly, however, I would like to wrap my head around this and use root motion over scripting the rotation. Any help is much appreciated!

    Sorry the below images are a bit hard to see the raycasts! Please note the animation info in the inspector.

    image1: Idle Animation Raycast
    image2: Turn From Empty
    image3: Turn From Idle
    image4: Turn From Idle with Root Rotation Baked

    Attached Files: