Root Motion keeps character in the same position

Hey there!

I have been working for quite some time now a unique dodging system in my ptoject, and I am trying to achieve this system using root motion animations. My issue is when I click the necessary inputs to dodge, the character does dodge, however he stays exactly in the same spot

Example: https://youtu.be/cHWf_1Qm4gc

So I went all around looking for the source of the problem, maybe it was the animations themselves. Right now in my blueprints this is what I have set up, it uses a blendspace in the animation blueprint and whether or not the “IsDodging” bool is true or false depending on the inputs, the character will dodge in the direction of the joystick

So I figured even though it works, maybe the animations aren’t setup properly for root motion, so I swapped out my current code to instead play an anim montage when the inputs are pressed:

Yet this actually seems to work, although since it’s only one of the animations, I am (in this instance) only able to dodge backwards

Example: https://youtu.be/JyLOs7Um6y0

So now I’m all out of answers here. The animations work perfectly fine on their own but it seems to have a problem playing with a blendspace. Also before anyone suggests, I did also turn on the ‘Root Motion from Everything’ option in the animation blueprint

Screenshot 2024-05-13 135407

Any further help would be very much appreciated!!

Hey @ShartInMyCart!

So we need to know a good bit more-

Since this is concerning animations we really, really need to see the animgraph and states, with as much information as possible. We will also need to see the blendspace itself.

Also, check your animations to make sure root motion is enabled on each of the individual animations as well. Often, animation packs will have a group WITH and a group WITHOUT root motion, so make sure of that by opening them from the animgraph (not the list on the side).

Bring back more info and let’s take a look! :slight_smile:

Yeah no problem!

So, all animations individually have root motion enabled to them, and here is the anim graph, everything that says /Script/ and then some mumbo jumbo afterwards is either a state machine or cached pose, the website just doesn’t draw them as such:

Here is the event graph for the AnimBP:

Here is the state in which drives the dodge animation logic:


Screenshot 2024-05-13 193034

Here is the dodge being referenced in the main locomotion:

Finally, here is the blendspace:

Hopefully that helps a bit more but if not I’ll grab more stuff if need be!

Can you grab the root motion settings on the ABP, as well as a sample of the settings on your Animations?

I notice there isn’t a red line underneath your skeletal mesh there, which means you are right, it’s definitely not working. Maybe you have force root lock active?

I checked and none of the animations have Force Root Lock enabled on them, and I did make sure before all of this to enable the Root Motion from Everything setting, unless there are more root motion settings that I wasn’t made aware of??

So doing some research, I have a few more questions:

Did you convert these with the IK converter when retargeting? I know some have mentioned needing to uncheck all RootMotion options before conversion, then recheck them afterwards or the rootmotion doesn’t work in state machines.

Actually, try checking this: UNPLUG your Blendspace. Then replace it with each dodge you’re planning to use, and test it. If they then work with RootMotion (this is different from using a montage) then it’s the blendspace and we can ignore any settings on the ABP or anims and focus on the blendspace.
This way we can at least figure out if it is or isn’t the blendspace that’s the problem! :slight_smile:

Hey, so I did what you asked and I should have stated this earlier but I did retarget the animations to another skeleton and I tried again but this time disabling all root motion options and then plugged them into where I would put the blendspace but it was to no avail, but it is for sure the animations and not the blendspace it seems

Okay, good to know one thing it isn’t, we can ignore the blendspace for now!

This thread has a few options for seeking out what’s causing issues like this, give it a read!

Out of curiosity, yYdireciton, in the AnimGraph when you execute dodge you use a BlendSpace with the input directions.

Out of curiosity, the Montage you’re playing doesn’t happen to be using WarpMotion does it? whereby the character moves to some other points at particular points in the animation? if so, does the blendspace refer to these different AnimMontages? or just AnimSequences?

It doesn’t seem like root motion is the problem since at least 1 AnimMontage animates and moves the character, it sounds like the switching of that variable “Dodging” only executes the animation within the blendspace but no additional logic for moving that character.

No the montage doesn’t use warp motion, honestly this whole setup was the result of a tutorial I was watching for 8-directional dodging for enhanced inputs. I set it up exactly how the tutorial had, and there’s worked perfectly, and mine well, doesn’t haha

Thank you! I’ll check this out

Hey all, I figured I’d come by and say I scrapped the blendspace method and moved on to just creating a component instead and it works like a charm! So this will likely be the end of this topic but to anyone else who comes by and has a similar issue I strongly suggest looking at the information provided above as it was very helpful, but didn’y work in my case due to beginner level errors on my behalf haha, thank you to the wonderful people who tried their best to help me, I will always appreciate it!

Here’s another link to the other topic just in case:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.