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

Remove the default rotation of an animation

Discussion in 'Animation' started by UMSDev, Jun 14, 2018.

  1. UMSDev

    UMSDev

    Joined:
    Dec 17, 2017
    Posts:
    12
    Hello,

    I'm a very beginner with animations in Unity. All my animations and characters are in FBX files.

    If I drag and drop my player.fbx I can edit it, so I dragged it and made a prefab out of it.
    I created an AnimatorController and dragged and dropped all my fbx animations into it.

    The root node of my Rig and of the animations is on "None".

    But all the animations and the character have a rotation of -90 on X on the root object which makes it hard to put them in my scene because I need to apply a rotation to change that and then I'm unable to rotate on Z (maybe I misunderstood something here, but if I apply a first rotation on X, when I add one on Z in the editor it doesn't rotate on Z).

    I need to easily rotate on Z to change where my player is looking at.

    So I thought I could remove this -90 rotation on my character and all its animations to fix it.

    But I can't edit the animation (fbx files) in Unity and therefore can't change the rotation.
    My player looks like this :


    and the animation :


    I might have not imported the fbx correctly, I've tried several options (setting a root node or not...) but it doesn't get better.

    If I remove the rotation in the inspector it always comes back when the animation starts again (and the idle animation has a loop so it's always reset)

    So to be short : My animations work well but they all have a -90 rotation on X and I'm unable to correct that later by rotation the rigidbody associated.


    I hope i've described my problem enough and am pretty sure it's a really easy problem for non beginners.

    Thank you for your help.
     
    Last edited: Jun 14, 2018
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,781
    I think the issue is the rotation error should be fixed on import, not later, and not in the prefab.

    Fix the rotation errors on import, before creating a prefab and it should fix the problem. Also - if using humanoid rig setup, this rotation issue can not be changed - except on import - afaik.

    After fixing the animation on import - you will need to create a new prefab with the 'fixed' assets.
     
  3. Tech-Labs

    Tech-Labs

    Joined:
    Feb 5, 2014
    Posts:
    52
    Did you try the Root Transform Rotation - Bake into Pose option in the Import-Animations tab?