Which hit detection system should I use? [Solved]

I have some basic rectangular prisms for my hitboxes :

Currently I am using :GetPartsInPart() for my hit detection but am not quite sure if it is worth using over :GetPartBoundInBox() . They both work quite well and I know GetPartsInPart() take more processing power but I would like to ask the experts which you all think I should use just to make sure.

1 Like

Seems like the utility of using GetPartsInPart is that it allows for more accurate overlap detection such as when dealing with complex shapes like when using MeshParts. Alternatively, GetPartBoundsInBox looks for part overlap limited to the shape of the specified “Box”, but in doing so becomes computationally less demanding.

Since you mention your hit boxes are rectangular prisms then it would make the most sense to use GetPartBoundsInBox, simply because you aren’t gaining any benefit of the enhanced overlap detection with GetPartsInPart while still paying the excess computations for it.


That was my original plan, thank you for the confirmation!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.