I’m scripting an battlegrounds-type game and I’m wondering what kind of ability hit detection do games like The Strongest Battlegrounds, Jujutsu Shenanigans and other battlegrounds games use.
My current method is to do 2 raycasts forward starting from the player’s HRP. One raycast goes 1 degree left and the other one goes 1 degree right for a certain number of degrees.
Here’s a drawn representation of my method:
As shown in the image, I’m a little worried about the fact that the raycasts are parallel to the ground. It might not detect the player if they are jumping.
I’ve heard that jumping is a way to avoid getting hit by an ability in many battlegrounds’ games, so they might be raycasting parallel to the ground, but I’m not sure.
Does anyone know how battlegrounds games do ability hit detection? Or is there any way I could improve my method?
Any help would be greatly appreciated.