Fbx with anim data not responding to gravity?

Hi all, I got a GameObject as follows in the hierarchy:
/Enemy/Enemy01
Anyone know why the ‘Enemy’ is always getting positioned at position Y = 0.05718? If I disable the animation, the ‘Enemy’ FBX model loads perfectly at Y = 0, basicaly gravity works but if the animation data is enabled, Y position value skyrockets to 0.05718? Would adding a Physics.gravity command help zero out the ‘Enemy’?

Thanks for the help.

Just to add, I’m using CharacterController.SimpleMove to move the ‘Enemy’, shouldn’t gravity be automatically be applied with SimpleMove?

Does your animation have any keys on ‘Enemy’? You can check this inside Unity with the animation editor.

If you hit Play then adjust the position of Enemy manually, does it drop back down? (and if so, to what value)

Hi Sycle, I got no keys for ‘Enemy’, all animation data is under ‘Enemy01’. The only things that ‘Enemy’ has are the character controller, my enemy script and audio source. I was told this earlier “You need to Parent the animated enemies to an Empty Game Object and then spawn that. The animations will be in local space and will not reset back to the world origin point.” This was advice I got when I ran into a bug where animation data wasn’t allowing Random.Range to function properly. http://forum.unity3d.com/viewtopic.php?t=52712
For the second question about moving enemies when the engine is running: I can pull the enemies along the Y position but as soon as I let go of the mouse button, they drop back to earth to the original Y value of 0.08654919. Each spawned enemy starts at that value as soon as I press the play button in the editor.

Thanks for the help, I really appreciate it.

Bump! Anyone else having this same issue where imported FBX files don’t stay perfectly on the main ground but float? If I disable animations, the FBX files all stay on the ground but with no anims.

Could it be that the original animation moves the object up slightly? If so, move it down by the same amount in the parent’s local space and it should cancel out the discrepancy.

It is result of animation being applied to root object. There are several solutions - depends what you want to achieve:

  1. Do not import animations
  2. Do not animate root object
  3. Do not play animation
  4. Parent your game object to empty game object