Download

Walking backwards jittery animation

Hi guys

I’m using the 3rd person template, with true first person type camera placement which is rooted to the head of my character.

Yaw control is on on the camera. Orient is off on the character movement.

I set up my blendspace with strafing sideways and walking / jogging backwards.

Blendspace direction is set to -180 and 180.

When I walk backwards though, my walk backwards animation is very jittery. I noticed that if I print the direction set up in my anim bp that it jumps between -180 and 180 almost every tick.

Animation almost looks like it’s alternating between walk forward and walk backwards everytime the direction changes in the print string.

Any way to solve this?

Thanks in advance.

Your issue is the blendspace itself.
the angle is flipping between 0 and 180 causing the twitch.

The proper way to resolve is to split forward and backward animations in different state machines and drive the animations with angular ranges.

As an example:

The transition rule between forwards/backward is this, you just swap the signs depending on the transition.
ForwardBackwards_transition.png

In my case, backwards is a 2D blend-space with just the speed. You can use a blend-space with angles, but it’s generally better to leave this “isolated” and add more state machines for the 45deg angles instead. Blendspcaes tend to error out the feet when between animations (at 50% strength between back and 45deg back for instance).

Thanks for the explanation!

I will refactor my blendspace and anim bp then as per your suggestion.
​​​​​​

I had the same problem, I made a video on how I fixed it with keeping a single blendspace. https://www.youtube.com/watch?v=Uckhu0ZYWMI

When you press backward, the “controller direction” will flip flop between -180 and 180, which causes the “animation direction” to flip between walking back right and back left. You can solve this by feeding all “controller direction” values from -170 to 170 into the “animation direction”, but anything outside this range should be converted to just 180 before feeding them into the “animation direction”.