I’m experimenting with client sided hit detection, as I hear it’s better for performance reasons. My current plan is this:
- Client input, fires to the server
- Server does cooldown checks and whatnot, and I set a variable as a Vector3, as the hitbox’s intended size.
- I fire to the specific client, and they make the hitbox and do hit detection, firing to the server once if the hitbox detects someone.
- The server opens up a temporary event so the client can tell the server if the hitbox hit anyone, and closes it at the due time (to prevent like, a hitbox that stays active forever).
- The server compares the two positions of the characters based on the size variable mentioned earlier, using magnitude.
Would this be a good way? What faults could there be? And are there better ways?