Snapping Problem With Stafing movement (With Rootmotion Locomotion)

I have a video for reference so you can understand specifically what i mean.

First of all, When I’m walking left and right the character moves slightly forwards, It’s a very small thing but very annoying, Also happens when i walk forwards and backwards, again very slightly.
Second, When i again move left and right the upperbody is not turning smoothly, As well as keeping the 1 frame Ironsight Animation for the right mouse button (AimDownSight Function).
The strafe left and right animation are the same exactly just one of them reversed.(i thought maybe its the animation itself. not it.)
Later in the video i show that i plug the Starfing movement blendspace straight to the AnimGraph(i’m blending head rotation + spine rotation + blending upperbody montages with default ones, so i thought maybe the problem is here.)
the problem is still there, i tried all sorts of things in the blendspace, nothing seems to fix it, maybe I’m missing something but i really need some help with this.
Thanks in Advance!

up

up

Hi there,
How did you setup your locomotion state transitions? Are you following a particular tutorial that you can reference?

Also, there are other methods that use Root Motion animations as curves, such as Motion Matching/Distance Matching that can produce better results. There are older forum threads about this topic, let me find those and share here.

If you mean in the state machine, then i checked multiple times and tried to change the transitions, eventually i figured that its not the problem, something with the animations for sure, in the video you can see that i plug the movement blendspace straight to AnimGraph, still got the problem.
I’m using rootmotion with anim notifies, maybe the notifies on the animations are not accurate could cause this problems i’m having ? i’m clueless really.
i tried to find a decent tutorials for motion matching but failed to find one, if you can find one it’ll be great, thanks for answering anyway ! i have the video that would make a little more sense, if any more pictures if needed i will upload.

Hi there
There’s a YT channel that covers distance matching very well. I’ll share the link here.

That looks good, though i like rootmotion better, he’s using in place animations, it means i need to redo the whole Anim BP which is a lot.
thanks for your help anyway ! , if someone knows or is familiar with rootmotion problems it would be great !

1 Like

Got it.
I’ll share here if I can find a good one.

up, im really stuck here people ! for a long time like 2 month i’m stuck on this bug.
anu help ?

Hi there
Have you properly added starts and stop transitions? Can you please show your animgraph?

Have you checked this free plugin that comes with a coded animation blueprint? The developer has a discord server to support you and his YT channel has several tutorials:
AGR PRO in Code Plugins - UE Marketplace (unrealengine.com)

This video shows how to integrate root motion animations:

You may want to watch the full series to understand better:

Also, take a look at this series, it uses root motion for everything, it might help you.

Thank You Very Much!, will watch those, i think i was able to narrow it down, i think it’s the blendspace or the transitions, though i’m not sure.
Here are the photos :

Note : FPS Locomotion not connected, ignore.




Great, thank you for sharing your animbp. Can you pelase show what is inside classic and strafing (state machines)?


It looks like you have the transitions setup, so the snapping problem can be caused by conflicting transition rules or movement parameters. Who guided you to setup this animation blueprint? Have you tried to reach the dev?

i didn’t really follow a single tutorial 100%, i learned what is needed for the transitions, i did this on my own, though when i look at the transitions they look fine, nothing really conflicts, thats why its weird to me.
i will check again though

In this case, take a look at this free plugin that shows how to use Kubold’s animations with root motion enabled. There are very interesting tips and tricks as well. and it’s replicated.

I will!, currently at work so later in the day, thanks you !

If you have that many transitions you are “doing it wrong” anyway.
You wont really find this out from docs or tutorials, but you can and should swap ABP at runtime to introduce different behaviours.

Now with that in mind.

What is root motion in practice?
Animating the position of the root bone (armature in blender) causes the motion to carry over in engine.

So lets say I have a walking forward animation that covers 10m in 3 steps.
If I play it, the character will move 3 meters exactly.

Now lets say thay the character moves at a non linear pace - like hopping on a leg.
The animation still covers 10m in 3 steps, but the speed at which the root bone moves is not constant. Lets say theres a 2s pauase at 5m and then continues.

Based solely on this:
How do you remove the motion of the root to get an in-place animation but maintain the speed in engine?

Rather Simple:
You save the position of the root to an animation curve, and you use the animation curve to alter the character’s walking speed.
(Note that you need to convert it to speed or normalize it in a 0 to 1 range to do it in engine).

Now given that, you should probably go ahead and re-do your animation setup so that it isn’t quite so convoluted. And replace the animation from root motion to in place - which can also be replicated on the network as opposed to root motion.

Ps:
With root motion driven animation even a slight rotation of the root could cause the movement to appear to step forward/backwards.
Always forward if you mirrored or -1 an animation to obtain the opposite side when talking of left to right.

Since you probably have to correct the animations anyway in order to zero out root rotation, you may as well process them to be in place and keep/copy the X or Y position of the motion as a curve to utilize as a varying speed…