I’ve managed to replicate gun recoil to the client, the server and the other clients, but I’m stuck on how to best reset gun recoil.
I thought of firing to the server when the mouse button is lifted up, but it will make it so that semi automatic weapons reset recoil everytime they fire.
The recoil works by:
1: both client and server start off with first shot accuracy
2: when client fires to the server and the server shoots its own bullet, recoil is recalculated and is fired to the client
3: each time recoil is recalculated, the possible spread is increased
So all that’s left is to reset the recoil after 1 second of no further fire.