FBX Import Problem

Hey guys,

Trying to import an animated mesh in Unity with the FBX format. It was scaled down very low so I scaled it up by 100. The model got spaces seperating each bodypart.
The “idle” animation starts when the game starts, I suppose.

Here is the editor view of the model:

and when I start the game, it animates with some parts of the arm being together like it should, but I get these wierd stretches:

Cheers for help,

  • Lars.

Scaling can kill animation transforms, but you can control the scaling via FBXPostprocessor :

class FBXPostprocessor : AssetPostprocessor
{
    // This method is called just before importing an FBX.
    void OnPreprocessModel()
    {
        ModelImporter mi = (ModelImporter)assetImporter;
        mi.globalScale = 1;
        if (!assetPath.Contains("/characters/")) return;
        mi.animationCompression = ModelImporterAnimationCompression.Off;

        // Materials for characters are created using the GenerateMaterials script.
        mi.generateMaterials = 0;
    }
}

Stick that class in Plugins/Editor folder and set the globalScale to whatever you want.

Also, there’s some caveats and things to watch out for when it comes to the scale you use when exporting your fbx for use in unity and there’s some guides/videos out there that I don’t know the link of off the top of my head, but a quick google search should find them. Also check out Unity - Manual: Model file formats

Hope this helps!

El Diablo