Walking straight backwards with "s" causing animation to stutter

I figured out a fix.
I think this is a rather wide-spread issue that you’d come across in development, and there definitely are different ways to fix it, but I didn’t really see anything much online other then complete system overhauls, so I took some time and figured it out.

The problem Analysis:
When does this issue occur? When walking straight backwards with an interp time > 0
Why does this occur? Because the angle jumps around from 0 to 360 or from -180 to 180.

Given those 2 facts, the first course of action is to prevent the character from moving backwards at all.
“But i want to keep moving backwards” I hear you screaming…
Of-course you do. You just can’t expect the engine to make it happen for you.

Step 1:
Make a nice and quick backward walking blend-space 1d with just speed. (unless your other aims glitch too, you should be able to adapt this).

Step 2:
Get rid of the backwards within the other 2D blend space

Step 3:
Get into your state and create a new internal state machine, as well as the following states:
Idle (state in picture), Forward and Backward.

Step 4:
Populate the states with your blend space and animations.
NOTE: Idle contains the same Blend Space as Forwards. Backwards contains the 1D walking back anim.

Step 5:
Compile and get the transition errors, then set up the states as follows:
Anything going to forward (notice it’s AND):

Anything going to backwards:

Getting back to idle if Speed <= 0

Test and adjust the variance from ±135 to ±145 if needed.
End result:

Remember this, because the issue is only really happening when walking backwards your grace angle can be rather lax and still allow for the animations to interpolate smoothly.
Doing this you can change the interp time between the rules from forward to back to match the same transition time of the blend-space without having issues.

Thank you!

I have a very simple answer to this. It may not work for more complex things, but it works for how complex I have gone so far.

For each state you have in your animation blueprint machine, have that go into another state upon a boolean value that checks what direction you are going in (I have an enumerator for each direction of input). If the character is moving backward, it can enter the transition to a state that is exactly the same as the forward version, but you get the absolute value of the direction you’re going in. Here are some pictures:

My State Machine:

The “Moving” State:

Can enter transition into the “Backwards” State:

The “Backwards” State:

Can enter transition back into the “Moving” State:

There’s’ my answer to this solution. I hope this helps!

In order to resolve this issue I suggest to do below checks:

  1. Set Orient Rotation Movement checkbox of Character movement component to OFF
  2. Target Weight Interpolation Speed value (in the Blendspace settings) should be at least 2 or 3 (try the best value for you)
  3. The Interpolation time of the Direction Axis (in the Blendspace settings) should be set to “0” (you can use the interpolation time of “speed” instead).

^^ above points fixed the issue in my case.

3 Likes

Long story short

1-Disable Orient Rotation To Movement in character movement component if it was enabled.

2-Set the interpolation in the blend space (of the direction axis) to ZERO

end of story :slight_smile:

1 Like

This worked like a charm. Thanks!!!

Thanks!!! I love you

Thanks this worked for me :smile:

Whoa we’ve got a lot of solutions here!

@anonymous_user_fe44a3cf did any of this fix your problem with the backward walk jitter?

thank you so much, it worked :slight_smile: you saved me hours of hours trying to find the proper setting or cause

oh my f* god you are a life saver.

that worked for me thanks

you sir are a legend :smiley:

Another possible solution which ended up working for me - Inside the animation blueprint, wherever you may have the blendspace node hooked up (whether that is inside the animgraph or the state machine), click the blendspace node and look at the settings in the details panel on the left. They can be different than the settings you put in the actual blendspace itself, in my case I turned “Smoothing Time” aka interpolation time from 0.3 to 0 and it did the trick.

My solution the problem.
image

omg it worked for me thanks!!!