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!
asked Jan 07 '15 at 04:52 PM in Using UE4
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.
answered Jun 14 '15 at 06:44 PM
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.
answered Mar 08 '18 at 02:12 PM
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.
answered May 20 '15 at 11:30 PM
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:
answered Jan 01 '17 at 11:33 AM
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.
answered Aug 02 '18 at 10:44 PM
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.
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: https://gyazo.com/91dde25c7b334fed4ce975dff949917f
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.
answered May 13 '19 at 05:12 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here