- Home /
Blender Animations happen in the wrong place?
This has been asked before but I don't wan't to change it to legacy because I want to use an animator controller. Is there a solution for this? When the animation plays no matter the original transform or whether it is parented is always goes to the same place. I believe it is going to 0,0,0 in the scene. Plz help.
Sorry I had accidentally put mecanim ins$$anonymous$$d of animator controller.
Answer by ToddToddTodd · Sep 04, 2014 at 07:02 AM
I had trouble with using animated objects made with Blender. Not rigged character animations, but objects with location and rotation animated. The object would go to the wrong place during play no matter where I positioned it with play off.
I have found two methods that fix this.
First Method.
You can parent the object to an empty game object. The object can then be positioned correctly by moving the empty.
Steps:
Click on the GameObject menu. Select “Create Empty.”
A new game object will appear in the Hierarchy window called “GameObject”. This is your empty which you can rename if you like.
Drag the animated object onto the empty in the Hierarchy window. This will parent it to the empty.
Position and rotate the empty as needed.
It seems that if you want to make a prefab to instantiate, you have to do this differently. I wasn’t able to instantiate an empty with an object parented to it. When I did there was something wrong (I don’t remember what. A script node didn’t remember what was assigned to it or something).
You can in this case : 1. Create a primitive object such as a cube in the hierarchy. 2. Then turn off or remove the collider and mesh renderer for the primitive. Now you have an object that can work as an empty but is not really an empty.
3. Parent your imported object to the primitive. 4. Then you can bring the primitive back to the project window to make it a prefab.
Second Method.
Another solution is to rig and animate the object in Blender rather than using simple location and rotation animations. (This won’t work for simulations of course. )
Steps: 1. Create one armature bone in Blender and parent the object to it. All vertices will attach to the single bone, so you won’t get any deformations. 2. The location and rotation of the object can then be changed by animating the location and rotation of the bone in “pose mode” just as you would with a character rig.
Works good imported into Unity.
I imagine there probably are other methods, but these worked for me.