Importing .fbx from blender, root motion warps animation

I can’t tell with the new UI if I’m posting this in the right place, please redirect me if not

Hello, I’m trying to export my animations from blender to unity and its driving me completely bonkers. Every export is warped or messed up in some way, and I’ve looked at tutorials and guides for days now and can’t seem to fix the problems.

(the animation I’m trying to get working is “bat_swing”)
blender file: new pirate.blend - Google Drive
fbx export: pirateCharacter.fbx - Google Drive
The warped animation in unity and my blender export settings: Imgur: The magic of the Internet

I’ve tried importing the .fbx file into a fresh blender file and the animation looks right, so I think I’m having problems in unity.

In unity, if I try to use the Humanoid rig type I get errors about “bone roll angle” which it doesn’t seem like I can fix without changing the root pose for my animations, which would then destroy the animations, so I’d prefer not to have to do that.

I’m using Generic rig type and creating the avatar from this character. If I set the root node to “none” then the animations look right, but the XZ directions of everything is inverted. I would like to be able to use root motion on my animations, but doing so completely warps the mesh for some reason. I set the root node to “rig/root” which should be the right bone. However enabling root motion does make the XZ directions correct.

I’m kind of at a loss and really frustrated at this point, has anyone here dealt with this before?

I haven’t had a chance to try this blend/fbx for myself so this may or may not be related, but I’ve had a lot of issues in the past with Unity FBX using the first animation in the FBX’s animations list as the “reference pose” so to speak. I always have to make a T pose animation, and name it _Tpose or something so it becomes the first in Unity’s alphanumeric animation list, so that my animations appear properly.

thanks, this is a good tip for getting a sane rest pose without having to do anything crazy in blender.

I spent a few more hours today screwing around with this and seem to have fixed the distortions, but I couldn’t really say what I changed. Exporting from blender to unity just feels like a carnival game, sometimes it works and sometimes not and there isn’t any rhyme or reason to it.

Right now my root motion is not working, I set the root bone to rig/root, but the OnAnimatorMove() delta position is always (0,0,0)

Yeah… you can thank autodesk for making FBX a mystery black box that everyone basically has to reverse engineer for that. Even Blender themselves can’t figure it all out. There’s been a long standing issue in Blender where exporting FBX doesn’t maintain keyframe being set to constant interpolation, as a fix they just put a keyframe right before it to fake the constant interpolation XD

Anyways, rant about FBX aside, glad you fixed the distortions! Sadly I have little experience with root motion so hopefully someone comes along and has more insight