so, i’m trying to make a hitbox for my game and i was wondering, which one is the most efficient? GetPartsInBox or Region3, i know that Region3 is depracated, but should i not use him just because of that? I’m also considering the Rotated Region3 module, from @EgoMoose, i want to know which one is the most precise, and doesnt affect so much the performance, also if you something that is similar to GetPartsInBox and Region3, you can say in the answers.
I’m assuming you mean WorldRoot:GetPartBoundsInBox when you say GetPartsInBox.
GetPartBoundsInBox is more performant than Region3s, however it lacks some accuracy, as it uses bounding boxes rather than exact hitboxes.
Region3 is a bit worse performance wise, however it is more accurate (if you disregard the fact that they are locked on the world axes).
Rotated Region3 is a personal favorite of mine. IIRC it keeps up pretty well with Region3’s performance, while still allowed for rotation. I’ve used this for hitboxes myself in the past.
When it comes to creating hitboxes, I usually use GetPartBoundsInBox, simply due to the ease of implementation. The slight inaccuracy usually doesn’t matter enough to be important to me.