RootMotion Animation Orientation

Hello,

I have an animation exported from Maya that faces opposite the normal forward direction.

When I turn on ‘Root Motion’ and switch the ‘Root Motion Root Lock’ to ‘Anim First Frame’ it changes the orientation of my object correctly, but it still moves in the same direction. I would have expected it to turn around completely. I’ve attached a video and the FBX files.

[Image Removed]

It seems like I can only achieve the correct animation orientation by moving it into the origin in Maya before exporting. Is that the recommended workflow for exporting root motion animation or is there a way to correct the animation inside UE?

Thank you.

Hi, the root lock feature just resets the root transform each frame after the root motion has been applied so that the root bone follows the motion of the animation. The property that you were changing (Root Motion Root Lock) just changes the transform that the root bone is reset to (ie. reset to the the bind pose transform, the transform in the first frame of the animation, etc). But that doesn’t affect the actual root motion of the animation. To modify that, you should be able to apply a pre-rotation when you import the mesh/animation via these properties in the importer:

[Image Removed]In theory, those pre-rotation values on import should allow you to work with any coordinate system and have it work correctly in the engine. In practice though, there are various areas in the engine that assume the Fortnite setup which is Y-axis as the forward axis for a mesh, and X-axis as the forward axis of a Character blueprint (ie. the mesh component is rotated by -90 in the z-axis).

[Image Removed]As a result, we would generally recommend sticking with these conversions if you can. If you don’t want to work in Maya with this coordinate system, one option that has worked for other licensees is to have an export tool from Maya that does the conversion for you. Again, in theory, the importer pre-rotations should be able to do this for you, but in my experience, that system is error-prone, so doing it on export is likely to give better results.

I also noticed when looking at the FBX files that the facing direction of the bind pose was different from the facing direction of the animation. That could also potentially be causing some of the issues that you’re running into here.

Let me know if you’d like to discuss this further.

Thank you for your quick response!

Yes, the character is created facing z-forward, but is facing backwards in this particular animation, which is causing us the issue in the first place.

Since we don’t want to change the coordinate system in Maya, it sounds like the best way of dealing with this is to convert it on export.

Thank you for your advice!

Yeah, definitely, if you want to work with a different coordinate system in Maya, we would recommend having an export process to perform the conversion. It’s going to be way less error-prone than trying to do anything in the engine.

For the specific case with this animation, if you want to mock something like that up quickly, you could use those importer-based pre-rotations that I mentioned. Just to double-check that gives you the correct behaviour. If it doesn’t for some reason, let me know.