Walking straight backwards with "s" causing animation to stutter

For some reason when I walk backwards with “S”, my character’s animation stutters left and right. Also, if while I am walking backwards, I move my mouse left or right, the animation orients itself to where I am rotating too. I want the animation to stay straight if possible. Any ideas as to why this is happening? =/

When I print string to my direction, it keeps flipping between -179, 179 and 180 (my backwards direction in my blendspace is set to 180). Somethings is keeps trying to reset my direction, which is what causing the issue (I assume), but I am stuck! I am really new too UE4 so any help/advice would be greatly appreciative!

1 Like

Was a solution ever found here? I have a similar issue to this. While walking backwards my character seems to turn slightly one direction or the other. Starting the game with the forward direction at x=1, y=0, z=0, walking forward nothing changes. Walking straight backwards and X bounces around 0.95-0.97, Y from 0.25-0.27. I stop walking, it instantly goes back to 1,0,0.

Hello Vaelek,

To be honest I never solved this problem (a designer on my team handled this bug). I had a chat with him, and the problem could be a bunch of different things. Part of the reason for me was an animation issue. Walking diagonally back and to the left/right was causing the character flip. Another possible problem was an issue with my blendspaces and my animation playing with root motion. Another possibly reason is how you are handling your character’s rotation with the capsule/animation rotations.

Not sure if this will work for you, but I would try making sure that you are playing your animation with root moton (depending on how you set things up, in your animation graph / anim preview editor (usually in the bottom right) / edit defaults (at the top of that window) / root motion / root motion from everything)

Like I said, this can happen for many different reasons, and I am no expert of Ue4. I hope I was at least a bit helpful! Maybe someone more talented than me can come along and help us out!

Can you post an image of your blend space?

What might be happening is that when the character is moving forward, then suddenly backward, it’s blending through either the right or left directions to get backward. Think of it like a compass.

There’s a way to prevent this compass-like behavior and go right to the targeted direction, in this case backward. In your Blendspace options under Sample Interpolation, mess around with the Target Weight Interpolation Speed value.

I solved this problem by unchecking “Orient Rotation to Movement” under CharacterMovement (Inherited).

Mine was checked because the tutorial I watched told me to check it.

6 Likes

Wow… I went to attempt that and it was already unchecked… I checked it, no change… I unchecked it, and the issue vanished -_-

Just for detail - The CharacterMovement is found in the character blueprint on the left side under components in the default layout. Click on it and on the details on the right panel you can find the Orient Rotation Movement checkbox. This is with version 4.9.

This worked for me too.

Thanks overcookedfunion.

It really works! Thank you so much!

I know this is an old thread, but I had the same problem and I believe I found out what caused it. I believe the ThirdPerson controller and the ThirdPerson “orient to movement” are fighting (something that usually causes a stutter in blendspaces), and so when you don’t want orient to movement, you need to set the bool “orient movement to rotation” in your event graph. Here’s how I did it, and it worked:

1 Like

I fixed it by unchecking these

130671-ue4editor_2017-03-18_02-27-40.png

1 Like

If anyone is curious, I found a solution to this annnnoooooying backwards walk jitter. As the OP suggested, it was because of a constantly flipping positive/negative 179/180 value. I played around with all the settings and variables suggested above, but I finally found a solution by changing the built-in math from the ThirdPerson Animation Blueprint as such.

Basically, the Direction already flips between -179.9 and 179.9 when walking backwards without the default code that Epic had in here. The default code here actually just does exactly what the TPBP does without the code. (If >180, subtract 360)

Once I changed these numbers, now it flips from -179.9 to 179.9 and won’t flip back and forth from negative to positive while walking straight backwards.

!!! I’ve been messing with this for HOURS! THANK YOU!

I had this problem and found it was due to interpolation on the Direction axis. I guess it’s trying to interpolate from -179 all the way to 179 and it causes a stutter. Try removing that and it should work better.

2 Likes

This worked for me. Tks

Hi,this is just what i need. But my bp is different from this one and i don’t know what the node is before <=. When the direction is less than -179, i make it +360 and that is all i do. The problem is, when I press S and make the character walk backwards, there will be a obvious shake on him at first and everything is normal after a while. I guess it is the problem of data import.

Removing? How?I tried what iamisandisnt do but still some problem.

thans you :slight_smile: , thats help me :3

None of the solutions in this thread worked for me. I think the culprit is when getting direction - using ‘get base aim rotation’ returns a direction that is constantly switching depending on your back animation (if your animation head moves a lot from side to side or if something is impeding your animation like collision). Hence your direction swaps from -179 to 179 and your character starts jittering.

The solution is to either fix your animation ( I didn’t want that) or to make a 2d blendspace with direction and speed and setting speed 0 with all direction to your idle stance. That way there is a path for the back animation to go → -179 back to idle to 179. Also the interpolation for both speed and direction MUST be 0, so the path can happen instantaneously. So frustrating, really hope Epic addresses this glaring issue. It works but without the interpolation, its less than ideal.

1 button, fixed. You, my friend, are a saint.