Animation Retargeting loses/ignores Root Motion

Hi,
I got an animation from the marketplace, which make the character roll. It uses Root Motion, meaning that the char its actually moving and I see the red line on the ground, as in the documentation example, and if you select “Enable Root Motion” the character rolls to the floor in place.

This works well with the UE_Mannequin, but when I try to Retarget to my character, the Root motion seems to be lost. The red line bone becomes white, and “Enable Root Motion” does nothing, the char is always moving in space, and there is no way for me to having it roll in place. My character has exactly the same bones of the mannequin, is set as humanoid.

Is this a bug, or is there a way to fix it?

Few minutes after posting the question I found the solution. Seems my character has one extra bone at the top of the structure, father of root bone. I will investigate why, but in any case if I set this top bone as Root in the mapping then the Root Motion is preserved properly, and the animation plays in place.

Looks to me like you are using Blender…?

If so, its a common issue and the only way I have found to resolve the issue is by editing the export python script.

In your file browser, go to “[Blender Installation Path]\2.80\scripts\addons\io_scene_fbx”

Create a backup of export_fbx_bin.py, then open the original to edit it.

Find this section in the file

elif ob_obj.type == 'EMPTY' or ob_obj.type == 'ARMATURE':
      empty_key = data_empties[ob_obj]
      connections.append((b"OO", get_fbx_uuid_from_key(empty_key), ob_obj.fbx_uuid, None))

And delete or comment it out.

I found the solution here

https://forums.unrealengine.com/development-discussion/animation/1466009-blender-to-ue4-root-motion-not-working

Hope this helps. Sorted out all my problems!