Animated object relocates in Unity.

I have made a simple animated cube in Blender 2.68 just to understand the basics of animation and exporting to Unity. The animated cube simply goes back and forth, nothing fancy. However when i export it to Unity and press play, the object relocates ands sinks halfway through the floor.

The funny thing is that when i export to .fbx using the following settings it works:

  1. I DON´T Check the “selected objects” box.
  2. I export “Empty, Camera, Lamp, Armatur and Mesh”
  3. The rest of the stuff is left unchanged.

The thing with this is that when i drag the cube into my scene the camera and lamp from blender goes along with it. But the animation works great and the cube doesnt relocate, I can even rotate the object.

Here comes the funny part…
When i export it to .fbx using the following settings that several tutorials say it doesn´t work:

  1. I CHECK the “selected objects” box.
  2. I export “Armatur and Mesh”
  3. The rest of the stuff is left unchanged.

This messes up the object in unity, it is now a single object without the camera and lamp but it relocates when i hit play… When i scale or rotate it in edit mode and hit play it goes back to its normal size and rotation and relocates…

I posted the same question in unity answers without result. Please help me :s

I have made a simple animated cube in Blender 2.68

How did you animate the cube? Do you have Armature animating the cube?

You need to have the cube parented in Unity, this makes its animation in local space. When you have multiple objects exported (not checking the “selected objects”), Unity automatically parents it for you. Simply put a parent over the object, and set its local position, rotation and scale to 0.