Download

Adding interpolation to player yaw movement. Works perfectly on server, jittery on clients. Ideas?

I’ve disabled using the controller rotation yaw and I am trying replace it with some interpolated movement. Everything is working as intended on the listen server, but for any clients the movement is jittery rather than smooth.

Here’s the current blueprint, can anyone suggest how I can modify this to avoid the jitter? I suspect it is somehow due to some conflict with the GetActorRotation on the remote interp, but I cant figure it out.

Ignore the fact that the interp speeds are different, I forgot to change it back from a test I did before taking screenshot.

eebb6dad048cb8c4875dc0c15060ec6a4b8d09c0.jpeg

That is caused by concurrent updates. You somehow update it in 2 places, make sure there is only one update.
Most probably local client updates it and then server overwrites.

Also switch has authority sometimes is not enough, you need to make another macro like that that separates server from local client. There are some edge cases when code is executed twice with just has authority.

Hey, thanks for the reply.

Looking at that blueprint, does anything look incorrect to you? I’ve tried many different approaches yet still have the concurrent update, would you mind elaborating on your solution?

I had bit different problem in player character blueprint.
After very long looking for cause of jittering i found out that i was updating direction of character and thus fighting with build in character movement component.
Character then was locally rotated (by underlying character C++ code) then server rotated its instance on server and replicated back. That caused concurrent updates to direction.
However from your code i see you probably do not have this (above) case.

There is also another possible cause of jittering that i know.
If you overwrite rotation of character, and you have set character component properties to face movement direction, then you have concurrent updates.
This stuff is invisible in local game, because both updates happen in same tick and most recent wins.

But on remote game, winner (most recent update) is replicated back to local client. And you have jittering.

Look carefully if jittering strength depends on direction of movement. If there is some direction without jittering then opposite direction has it very bad.
You most probably have some property turned on that rotates character to movement direction or to controller rotation.
Check those property’s of character movement component.

Ps. ther is also trick that can smooth camera jittering: add camera arm with a bit of lag.

Finally got this working. The issue was a conflict with the GetActorRotation, which I believe the character movement component is updating somehow, but I couldn’t find a way to disable this.

To work around it I ended up storing the pawn rotation to a variable on the Player Controller, then using that variable for the interpolate. So far, working as intended.

9ebee5e63f9763c46cd7f1092a546eeae347022c.jpeg

Any chance you could please post where you stored the pawns rotation blueprint?

On the player controller blueprint :

5c70eab9f6ba4f7a43af58a6bc92e1a2c94ded63.jpeg

Thanks for the info! One more thing if you dont mind, the node get casted controller is this a node from unreal?? Im using 4.10.4 so if you’re using anything higher maybe thats why but just wanted to make sure this wasn’t a function you made.

No, its a pure function which includes a cast to the players controller.

sorry to bother you one more time, Ive been trying to fix the jittery movement for almost a year now and still nothing. I am trying my best to do everything from the help you gave but still not working. Can you post the new updated blueprint because Im not sure if the one in the very beginning is working when I make the update you did on the bottom pic.
Thanks again. you give me hope this can be fixed.

Heyas!

I found this thread because I had an issue with what I would call replicated rotation ‘jitter’. It has to do with keeping the feet planted as you rotate the pawn. The owning client’s feet were planted. The server’s feet were planted. But the remote side would show the feet sliding in the direction of the rotation. The faster you rotate, the further the momentary slide.

So anyway, in case anyone else has the same problem and finds this, I thought I would provide an easy solution. In the CharacterMovementComponent, change “Network Smoothing Mode” to “Linear”. I’m not quite sure why “Exponential” would even be a thing…

Cheers,
Jin