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’?
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.
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.