Root Motion works fine in preview, but not in game

Hi everyone, Im testing root motion on one of my animation by doing the following: - On the animation sequence, “Enable RootMotion” is on - On my animation BP which is assigned to my player BP, root motion mode is set to “Root Motion from Everything” - My animation sequence is directly linked to the final animation pose in my animation BP

Now when I preview the animation with “process root motion” turned on, either in the animation sequence or in the animation blueprint, it works like expected. The model starts moving according to the animation, and in this case the root motion is set to apply a downward movement, so the model goes down infinitely and does not snap back to the origin. There’s also the red link between the origin and the model. [1]:

However in game, the animation plays “on itself” without moving, like it would if “process root motion” is turned off in the animation preview. The character model stands in the same place, the capsule collision stands in the same place, and so obviously root motion is not working.

On the character model, the capsule component collision is disabled. On the character movement component, Default Movement mode is set to “Flying”. “Gravity scale” is set to 0. “Allow physics rotation during anim Root Motion” is on & “run physics with no controller” is on.

Anyone have an idea of what I’m doing wrong? I’ve been trying to fix this issue the past few days, without any success. It doesn’t seem to come from my animation asset, as the preview seems to work fine.

are you sure you are using the animationbp that has root motion turned on - check the setting on the skeletal mesh component (it is possible to configure with other animbp or just animation)

Hi, yes the skeletal mesh which uses the animation has it’s animation mode set to “Use animation blueprint”, and the animbp configured with it is the correct one

hmmm are you adjusting the position of the pawn in anyway? apply any kind of input that would move it?

I have input applied to the pawn when using the direction keys or mouse movement, but at rest I don’t think there is anything that makes the pawn move. Would moving the pawn/adjusting it’s location/rotation manually stop the root motion from working?

possibly - with root motion you only need any input to just affect what animation is playing.try disconnecting any input just to test

I disabled input on the pawn, disabled “use controller rotation yaw”, pawn still doesn’t move when playing root motion animation

EDIT: I tested the same animation under a new blank first person project template and the root motion does apply to the pawn in game. I’ll compare both blueprints and post here if I find what was causing it not to work on my other project

Okay so I’ve managed to fix it, thank you very much for your help. The problem was that I wasn’t using the **inherited **skeletal mesh component in my character blueprint, I was instead using an other custom skeletal mesh component.
Apparently the characterMovement component only applies root motion to the inherited mesh that comes with the base character blueprint class

2 Likes