Root motion seen by Unreal, but not applied

Hi everyone!

So, I’ve been searching around a lot, and in fact, this is a problem I seem to have every time I work with Unreal. (Probably mostly because I forget what the solution was.)

I’m trying to apply root motion to an animated creature in my game. The root bone and everything appears to be correct, because the root motion is cancelled out when I select Root Motion, i.e. there is no “snapping” effect. However, the motion is not then reapplied to the creature. This is exactly the same as if I play the animation in preview mode with “Process Root Motion” turned off. On a turning animation, the creature does not turn at all, but instead plays a nice smooth animation of stepping in place.

This seems to be the exact same problem as this post from 2004: Root Motion not being reapplied to capsule? - Character & Animation - Unreal Engine Forums

Unfortunately, that post was never answered, so I’m still in the dark. Any thoughts?

Try inherit ACharacter for your creature class. Root motion feature has effect only when you are using CharacterMovementComponent. It’ll work if you enable tick of CharacterMovementComponent.

Could you be a bit more specific? I’m still learning the ropes of Unreal.

I’m assuming inheritance is done via the C++ code. How would I go about accessing that? How do I make the creature use CharacterMovementComponent? What exactly is the “tick of CharacterMovementComponent”, and how do I enable it?

You could inherit classes via Blueprints as you want. Open your BP and select ‘Class Settings’ from the menu above. You’ll see ‘Parent Class’ in details panel. Change it to ‘Character’ and recompile, then your BP class will inherit Character class. Character class instance has a CharacterMovementComponent as default sub component. Get a reference to CharacterMovementComponent of your BP character and call ‘SetMovementMode’ function. Setting it to ‘walking’ will make it work for you

Hi Stein84,

So I set my creature’s parent to Character. I tried setting the movement mode to Walking in the creature’s Blueprint Event Graph, but it didn’t seem to be working. I tried using a print statement, and that didn’t print out anything either, so it seemed like it was just not executing the event graph.

HOWEVER, Unreal crashed, and I lost my creatureBP, so I created it again, did what I thought was the same thing, and now it’s working. So I’m at a bit of a loss. But it works, so that’s good enough for me for the time being.

Here’s the picture of my event graph before it crashed (which is the same as it looks now).

42726-blueprinttick.png

Confusion aside, thanks for the help!

Glad to hear it works Trekopep. I don’t see any reason to crash in the screenshot. But the tip is that it is enough to call setting movement mode just once. Just for efficiency :slight_smile: