Hi everyone,
I’ve been working with Unity3d for a while now and I’ve encountered a seemingly random problem on different occations.
My .fbx files containing rig+animation hasn’t been working with my models, while in other cases everything has been working just fine.
I’ve searched the forums, google and any other places I could think of for help but none of the solutions presented have worked for me.
Today, however, I managed to find a solution to my problems and since I’ve seen many questions about this particular problem I thought I’d help out by posting here.
The problem:
You have a .fbx file containing a skinned mesh and its rig (without animations) and one or more .fbx files containing the rig and animations. The files are named as follows:
[model_name].fbx - This file contains model + rig.
[model_name]@[animation_name].fbx - this file contains rig + animation.
When the animations are played the mesh rotates (usually 270 x, 90 y) and is not animated properly. It seems as though the mesh isn’t skinned at all.
The Solution:
The problem, at least for me and some other people, was that the files containing the animations only had one object in it’s root. For some strange reason this does not work well with Unity (if anyone can explain why it works like that … ).
The solution is to simply add an object that doesn’t share the same hierachy as the rig in the animation files (in the base file the mesh acts like this object).
The reason why it works this way is:
When Unity import file with mesh and skeleton (two or more object in scene root) it has to add extra root bone for such object, because Unity doesn’t support multiple roots. When Unity import file with just a skeleton (a single root object in scene) it takes it without any modifications. These two behaviours causes mismatch between mesh and animations…
It a bug/problem in Unity, we have a bug report on it and we will fix it…
Just to be sure, Im new to Unity and I will work on a challenge “do a game in 40 hours” using unity and 3dmax… Sorry for asking without enough knowledge, I will work on max but our Unity developer does not know much about bones and animation.
The way to surpass the problem is to insert any kind of extra bone, outside the original skeleton, so export the fbx?
This bug have been fixed? Because I’m dealing with this exactly same problem… I’m using the 3.4.2f3 version. I have the 3.5.0b6 version but I don’t wanna upgrade my project for a beta version without having sure that this will fix the issue.
For Anyone who’s facing this issue.
U need to set the rootbone position of the attached object to the position of the Main SkinnedMeshrenderer rootbone position