I buy animtaions form marketplace, but when I walk my character is sway.



I think when the foot hits the ground it doesn’t move in a straight line. I getting it right and how do I fix it?

What do you mean by sway?
Looks to me that you are trying to say foot sliding?
If you mean foot sliding, then there are a couple of ways you could fix it. The easiest way is to match the max walk speed with the animation. Other than that, you can use root motion which is the best possible accuracy for the foot sliding problems.

Anyway, we might need more info on what you mean here:

In video foot sliding left and right


I tried to match the max walk speed with the animation, it’s can fix sliding forward and backward but can’t fix sliding left and right


If looking from side view you will see foot sticking on the ground, but If looking from back view you will see foot sliding left and right.
how to use root motion? I select here? I am a beginner thank you in advance.

Try checking “preserve local transform” in the animations asset detail panel and see if it fixes it. Not always the problem but worth checking.


Select here form preserve local transform? I try to check animation walk Ue5, you will see when foot sticking on the ground foot will go back in a straight line but animation walk Margetplace when foot sticking on the ground foot will not go back in a straight line. when looking from behind My foot look sway.

Root motion is not something that is easy to set up for gameplay. From what I can see in your screenshot, your root motion isn’t applied simply because you are forcing the root lock.
Foot sliding is not an easy thing to solve, it will take a lot of trial and error.

In addition, root motion is not something for beginners but you are encouraged to explore it. You may read the provided documentation. I would personally doubt that this will be the final solution. Cause you might need to do IK as well. So, since it’s just a very very very small detail that won’t affect the game (for walking forward), just focus on other stuff for the development. :confused:

1 Like

I’m not sure but I don’t think you can use root motion on a blend space, so far I think it’s just used on animation montages, but yeah like @56legion said, the easiest way to make it look better is to set up the speed of the character to match that of the animation, then you can increase the ground friction and braking deceleration to stop the sliding but for a more complex system you can lower the speed of the character in time, it’s fairly simple to set up and you’ll be making use of the world delta seconds and not the tick

Just to clarify your point:

I’m not sure but I don’t think you can use root motion on a blend space, so far I think it’s just used on animation montages

Root motions are not limited to montages only. This is common in the AAA game development industry. That is why I said, it is not easy to set up. Plus root motion is designed to follows the movement curve of the animation, which has variable movement speeds and translation.

You can use it in the blend space as well. Keep in mind that root motion setup is not the same as in-place animation.

1 Like

Thank you everyone, I’ll try to learn more about it.

I think the problem might be animation related because when foot sticking on the ground foot will not go back in a straight line, I tried to get the animation from mixamo which is no problem because foot will go back in a straight line, I’m probably going to have to troubleshoot at the animation. :pleading_face: :grinning: