Why do my character start shaking when moving backward

Here’s the blueprint that I wrote: . posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4

And at 0:10, I am looking at the character while I am moving it on its own axes (wow camera)

But if I am pressing backward, the character start rotating and moving at the backward axis of the world.

How is that lot being called? On tick, or what? It may have a lot to do with it…

Yes it’s a tick, but what’s the problem with it ?

I debugged the blueprint and when I press S, it goes only to backward branch, no elsewhere.

Seems like your character mesh colliding with some component. How many components have your character?

Only traditional component I guess.

I do not carry weapon at all, only the default UE4 mannequin alone.

Are you changing movement speed when strafing or moving backward?

1 Like

no, but have you ever had this problem before ?

I should start a new project and writing code by code to see where it begins to start doing this weird behavior.

Check your BlendSpace and try different interpolation time.

However, you can debug this - remove the blendspace and put animation sequence to see if this still happens. If it solve the problem you need to change your Blend space.

Then you can remove the blendspace for the backward motion and isolate the backwards animation in a 2D blend with just the speed input and relative frames. In this way you won’t have any angle issues when transitioning between 0 and -180

Concurrent updates for direction, probably in character movement component you have it set to direction follows velocity vector, then in blueprints you rotate character in different direction.

Finally I found it, I needed to use GetControlRotation() instead of GetWorldRotation() of the Camera/Mesh.

Though you didn’t write a lot, reading it made me recognize my mistake! So thanks for that!

I am in a replicated environment and only my client players had weird shaking in their backwards movement. It looked like location corrections to begin with but first of all I thought it was some kind of component collision. I didn’t really have an idea.

However, in my case, it really was corrections. I have a function that calculates walk speed depending on different flags and states (like IsMovingBackwards), so if anyone is doing something similar: all these states of course need to be either replicated to or simulated on the client in order to keep it from shaking.

Sorry for necroing this thread, I only wanted to note this in case someone has the same issue or maybe I myself stumble upon it in the future…

You technically do not have to replicate all the states and flags. Simply put it all in a function that at the end defines the state and sets the movement speed accordingly.

Run this on the client end, then RPC the server to run it. I can give you a demo/bp pics if needed.

In a server authoritative setup many gameplay relevant player states need to be decided on the server, so there needs to be some replication. Either it’s just the current movement speed or the client has all the info the calculation depends on to correctly simulate it. But yes, you don’t necessarily have to replicate them at all times, RPCs might do as well.