Best Way To Handle Combat/Melee Attacks When Sound Effects Are Involved For Feedback?

I’m currently using raycasts to determine hits with my melee attacks, which works okay. I’m just wondering if this is the best approach when I’m also trying to include sound effects for damage?

Currently, the melee attack animation plays on the client, which will of course play instantly. The animation has a delay between client-to-server/other clients, so the melee attack is nearly complete once other players see it.

The melee damage sound plays if the server determines that damage is done, which of course will be delayed on the client doing the attack - thus being unsatisfying to see the attack finished on their end before doing damage. What is the best, most satisfying approach for making this a good melee system?

1 Like