Search Unity

Floating Character Animation

Discussion in 'Animation' started by Muku, Jan 13, 2014.

  1. Muku

    Muku

    Joined:
    Jan 13, 2014
    Posts:
    13
    I am having an issue with an imported character animation in Unity.
    The animations seems to have no issues playing and the pivot is in the correct place but when it starts to play instead of the character bending over his feet move up and begins to float as if the floor were moving instead.



    Maya LT 2014
    Unity 4.3.3
    Character file is .FBX
     

    Attached Files:

    Last edited: Jan 14, 2014
  2. wizardious

    wizardious

    Joined:
    Dec 31, 2009
    Posts:
    189
    You need to be more specific in your questions. Are you using Mechanim? Have you chosen humanoid,generic, or legacy? Is it a looping animation,if so are you getting green lights? ect.....
     
  3. water_from_dust

    water_from_dust

    Joined:
    Sep 14, 2012
    Posts:
    2
    I'm having the exact same issue. I'm using a humanoid rig setup in Mecanim. It does not matter if my animations are looping or not - they always make the feet float.

    Pics:

    $feet_float.jpg

    As you can see in the pic, my Max file looks correct - feet do not move while the hips translate downward to make the character "crouch".

    However, when the character comes into Unity, the hips translate downward only slightly as much as in the Max file. And the feet translate upwards. The character ends up in the correct pose, only "floating" about 1" off the ground plane.

    Any assistance with this would be greatly appreciated.
     
  4. Sebastianphi

    Sebastianphi

    Joined:
    May 18, 2013
    Posts:
    2
    I've had this problem for a while, couldn't find the solution searching online, but i'd imagine it's in the docs. On the character in the import settings in the animation tag try checking the boxes for "Root Transform Position(Y)" , "Root Transform Position(XZ), and "Root Transform Rotation" and setting the 'Based Upon' dropdown to Original to get the animation data from the original file and not from something else like the centre of mass (assuming your not using mecanim's Root Motion).
    Presumably if your not animating the root bone in anything other than Y and not changing it's rotation you won't need to check all 3 bake boxes, but I would imagine that is what you want.
    From what I can tell this is because mecanim gets information reletive to the root bone- just like Generic rigs in mecanim which has a drop down box for it, but with a humanoid rig you can't set the root bone as far as I can see, you can only set the hip bone when setting up the avatar definition from the Rig import settings.

    It's possibly the problem is also something related to foot IK, I read a bit about that here: http://forum.unity3d.com/threads/222625-Character-Animation-Bent-knees-and-bobbing-using-Foot-IK

    But changing the foot IK has not made any difference in any of my tests so I think you just want to make sure your baking the root bone data from the original file and it should playback correctly.
     
  5. beowulfkaine

    beowulfkaine

    Joined:
    Apr 3, 2014
    Posts:
    185
    In the health section, is there a way to have this play a random death animation instead of selecting a specific one?
     
  6. sadpanders

    sadpanders

    Joined:
    Jan 22, 2023
    Posts:
    12
    my problem was the looping anims or w.e one red. unticked. works