Gun rotation in a 2D Multiplayer game

I am making a 2D arena shooter right now in the style of duck game. And i have a weapon that rotated to the mouse position. But it dosent get replicated porperly. Right now only the host can rotate his gun and if the host rotates his gun he will also rotate the gun for the other clients. How do i fix that ?

This is how i do the Gun rotation. The Rotator is set to replicate.

And this is my Main Update Loop. It sets the Rotation of the Gun

And this gif Shows the Problem.

1 Like


you can take a look at my post. I think this is similar.
All movement must be done by server, and applied to client, after.

Hope it will help you