Hello.
I’ve been trying to make my own FPS game as secure and usable as possible, and i need help with finding a compromise.
Earlier, i was simply using fastCast and i’m still going to and firing a bullet from the player’s head (which is the same position as the camera) and giving the server a direction to fire from and replicating it to other clients via an event but it seems rather inaccurate as i have no marker and i end up with something like this:
Where you would think the gun is going to fire

Where the gun actually fires:

note: by desynced i mean how different the origin and direction of the cast is between the server and client
Further, if i were to fire from the barrel the origin + direction would be de-synced badly (about 1 stud further, and rotated a lot, because of distance stuff)
This could be fixed by trusting the client and taking an origin + direction, however i can’t do that because of our pretty friends, exploiters. I haven’t been able to find a compromise between usability, desync, replication and exploitability, and any input about it would be very useful. Thanks for reading!
edit 1: formatting mistake fixed