Search Unity

Animation not working properly when running game

Discussion in 'Animation' started by MonkeyKasai, Aug 3, 2014.

  1. MonkeyKasai

    MonkeyKasai

    Joined:
    Jan 4, 2014
    Posts:
    40
    Hey guys hopefuly someone can help me out.
    I'm very new to Unity so have been just trying out getting basic's down.
    I made a quick model in maya and made 3 animations for it, "idle", "walk" and "run".
    It is all 1 file and I exported it as a FBX and imported it into Unity.
    I put the animation type as Legacy and made my 3 different animation clips. When I play the clips in the preview box in the inspector they play exactly how I animated them in maya.
    However, when I use them in the game, "idle" and "walk" work perfectly fine but the "run" animation my characters arms stay completely straight. I've doubled checked the preview of the run and can clearly see the bend at the elbow there and have tried exporting the file out again but the arms still stay straight when I run the game.
    What I find also weird is that my characters starting pose is in the run position with his elbow bent so I have no idea what the problem is.

    All im using for my animation in the script is animation.CrossFade

    Please help =)
     
  2. TMPxyz

    TMPxyz

    Joined:
    Jul 20, 2012
    Posts:
    766
    Open the animation view(Ctrl+6),
    And check if the "run" animation has the right curve for the elbow
     
  3. MonkeyKasai

    MonkeyKasai

    Joined:
    Jan 4, 2014
    Posts:
    40
    Thank you!
    I opened it up and the joint and alot of other joints werent even showing up in the run animation.
    I went and baked the animation in maya with the normal baking tool instead of just baking it in the fbx exporter.

    Thanks again! :)