Seeking advice on efficient hit detection for a melee combat game

Raycast Hitbox personally works best for me. For punches, I add damage points across the whole arm, not just the hand.

And if you’re worried about shorter arms, you could try forcing a certain package onto every player (e.g. every player could be blocky). This way it’s fair for everybody.

Performance-wise, I’m conflicted. If you do hit detection on the client, there’s much less potential for performance issues. But that leaves a much bigger possibility for exploitation. Of course, this issue isn’t just impacting Raycast Hitbox though.

And for optimization, I would follow these 3 tips:

  1. Use the task library
  2. Remember to disconnect any unused connections
  3. When creating instances, change its Parent property LAST

And even better, if you’re up to it, you could comb through Raycast Hitbox’s code and optimize it the best you can. I believe it’s been a good couple of months since it’s been updated, so there has to be some vulnerabilities in there.

Hope this helps,
Fizzitix

1 Like