Root motion not working in preview`

I have a character that swings a sword and steps forward as they do so, I’m intending to use root motion to get this to work.

Root motion is enabled for the swing animation in persona and the character stands in place when swinging (when I process root motion the character begins to walk forward. People have mentioned there should be a red line but I don’t have one (though I don’t know if I need to enable visualization or something)

The animation is being played through a montage in the animation blueprint and root motion is enabled for montages, when previewing the game though the character isn’t translated at all (the capsule remains stationary).

I’ve loaded the project into UE 4.18 and it still doesn’t work, the only thing I can think of is that I need to rename the root bone to “root” (as it’s named ‘charactername_reference’ at the moment b/c that’s what Maya’s human IK defaulted to) or that it’s possible because the root joint in maya isn’t a normal bone (again, it’s the thing human IK defaults to) - but then I wouldn’t know why it would work in persona at all…

there’s very little information about this problem and the only other forum post I could find was archived w/o an answer so any help would be extremely appreciated!

I can post a video if I didn’t explain the situation well

edit: Root motion not working... - YouTube annotated video of the problem

Hey there, a video would be helpful. You say that in preview in doesnt work, but what about in runtime?

okay, I added a video in the original post, I’m still quite new with unreal so if there’s anything I missed please tell me!

To see the red line you need to go into Show > Bones > All Hierarchy. The preview seems fine once you enable root motion and process root motion, he starts walking forward and accumulating the movement. Is the problem when you play the game?

Do you have the Root Motion mode in the animblueprint to Root Motion from montages only, and do you use the animmontage slot in the animation graph?

Yeah, it’s only in game (I show it at the end of the video)
It just seems like the capsule component isn’t moving - someone said if the skeletal mesh is too small root motion doesn’t work but my mesh is about half the size as the third person example thingy (the mannequin guy)

Yep, root motion is from montages only and the anim montage slot is being used in the anim graph

Can you show me the animation graph and play animmontage code?

The event calling the anim montage is just a button press and the slot the swinging montages are in is the “default slot” (which is the final thing in the anim graph chain)

Can you try playing the animmontage on the character? Make a key bind and execute the montage play and see if that makes a difference.

activating the montage through the character BP instead of the anim BP still doesn’t work (unless you meant something else…?)
Because the character moves in the preview window in persona I think the problem is that the capsule isn’t properly connected to the skeletal mesh or something

I was talking in gameplay, not in persona preview. Bind a key to the play animation montage and see if that works. can you show me the animation graph?

Good to know :slight_smile: Please mark the answer as correct to close it !

Okay I got it working!!! When I first made this character (which was right as I began learning unreal) I had added another component in the blueprint for the skeletal mesh and had left a slot called Mesh (inherited) empty, I replaced all the skeletal mesh references in the BP to the Mesh (inherited one) and set up the character in there (added the skeletal mesh, the anim blueprint, etc) and it works now! Thanks for all the help bro, very much appreciated :slight_smile:

Thank you! It works!