Hi everyone,
I'm a newbie and I want to learn as much as possible. I've been working on a problem all day long but I haven't found the solution so I ask your help wishing to figure out how to solve it.
I created a model in Blender 2.49b with an animation. It is a very simple model:
The first is in the starting position and the second is the ending one: So Blender shows what I want.
When I import it in Unity its behaviour is completely different...
Here are some screenshots of how the animation works in Unity:
Other informations that can be useful maybe are these: The starting position of the mesh (with no armature and modifications introduced it) is like the one in the first image but with the arms aligned with the X (red) axis (the cannons are perfectly alinged and overlayed on the X axis to be more precise). In the first frame of the animation the arms have 70 of difference from the X axis rotating from the front view and other 20 of difference from the Z axis rotating from the side view (I've just rotated down the arms and a little bit forward).
When I export I just copy the .blend file in my "Models" folder and leave to Unity all the operations. I think it uses the standard settings used by Blender to convert the whole in .fbx which are:
Thanks to everyone who will help me. The problem is very important to me because I've spent something like 80 hours (at least, and I'm not joking) in training and gaining the knowledge to create this videogame. My target is to expose my work as an exam project and I'm working very hard to create something valuable and I don't want to stop for a problem like this one.
Thanks and regards, BlackGecko.
EDIT after Mike's answer
Here is my solution but I really don't know why it worked:
First of all I rigged the mesh in the way Noah's told me so no bones out of the mesh. In the first picture a central bone goes backwards and out of the mesh. The purpose of that bone was to translate every bone just moving that bone. It is what I call the master bone but it is just my way of naming that bone, considering that I know very little of 3D modeling terminology. I moved the master bone inside the mesh in the direction -Z (note for newbies like me who will find this page in an agony moment: -Z means "aligned with the Z axis but in the opposite direction" so in this case the bone points down). Anyway I didn't test if this rule is really necessary and there are some things that made me think. Notice that my model has no arms, like Rayman, so the bones I made still go out of the mesh. Anyway I would always try to keep the bones inside the mesh.
I simplified my animation moving the arms just in one direction (this is another thing that make me think that probably the problem is not completely solved).
I exported using Blender and not imported using Unity.
I exported using the following settings: Like the image but Scene Objects, All actions has to be selected (if you select current action you have to select it otherwise a model without animations would be obtained).
This is the thing I think solved my problem. I weight painted my model again. This time I painted ALL the vertices because the first time I didn't paint the body's ones.
Never lose the calm. It is quite obvious but I passed two hours in the IT lab of my school with my classmate trying to make me angry. At the end of the two hours I obtained just more problems.