Root motion animation rotation on the wrong axis

Hello! I’m new to unreal engine with the introduction of unreal engine 5, and I am currently trying to implement a root motion based animation system for my character.

There is a problem though. First though, I’d like to mention that I do process the animations through a plugin on blender, that adds a root bone to Mixamo imported animations, after that, I import the animations to UE5 after I retargeted one of the skeletons to match my character’s pose, bone structure, etc.

When I import the animations to Unreal Engine 5, what happens is that it looks fine at the beginning, but, once I enable root motion from the details panel, the animation decides to flip 90 degrees and play into the floor (??). I tried to change the import settings to when I upload the animation, it imports with negative 90 degrees on the x axis to counter that, but, even though it’s rotate -90 degrees, when enabling root motion its again face diving into the floor.

Essentially, I thought “well okay, perhaps I can try to use the animation like that” and changed the root motion root lock position to “Animation’s first frame” – and that looked promising in the preview of the animation, because it seemed to actually rotate on the x direction when the feet are on the floor BUT, when I went ahead and tried to implement it into the anim blueprint, funnily enough the whole character decided to turn 90 degrees on the Y axis (so if ‘|’ is a standing character, it turns to be ‘-’). Don’t get me wrong, it’s an hilarious feature nonetheless, but it’s not what I’m looking for obviously.

I’d like to also note that other root motion based animations I used the same workflow on worked perfectly (walking, running, sprinting) but these specific animations (turn in place to the right and left) seem to be problematic.

I also did try to exchange the actual animations for different animations (basically still turning but looks slightly different) to make sure that it’s not these specific files.

Does anybody have a clue what could be going on? I’d love your feedback because that’s a really large roadblock I’ve stumbled upon and I can’t quite seem to figure it out.

EDIT: Forgot to add that I also had a suspicion it has to do with blender using -z as forward axis and unreal uses positive x. I tried to import using the “force positive x forward axis” but that just breaks the model. I also tried to animate the animation within blender adding a singular rotation value every frame, and then exporting it with the setting (x-forward) but that didn’t work either.

I’ve run into this same roadblock, and have yet to find a solution. Have you found any work-arounds?

I stumbled on related problem, I think.

  1. Downloaded Mixamo character and manually added a root bone in blender. Then imported it to unreal. Character oriented properly - everything is good so far https://i.vgy.me/T2Ug1C.png
  2. Retargeted a climbing animation from UE Mannequin. When Root motion turned off - everything is perfect. My character moving up as intended https://i.vgy.me/Fh1DkS.png
  3. But when I turn root motion on - Z movement flips and a character starting to move down https://i.vgy.me/E6LFni.png

In blender I turned Root bone like this https://i.vgy.me/k53E0h.png (Z pointing down). This way it imports to unreal with proper rotations as shown abowe. And I am sure, this is the root of my problem :slight_smile: But I can’t figure out how to set this up properly

Hi, did you find a fix for this eventually?

If anyone reads this, I believe I found the solution:
image
just switch the root motion root lock to “anim first frame” after rotating the animation on import to face your desired direction.

1 Like

Try RM Fix Tool plugin for UE5 https://youtu.be/JbWckEC9jlk?feature=shared it let’s you fix any animation root motion problem in couple clicks, change, offset and rotate the whole animation.