I don’t really use touched in general, but from what I heard, it’s not used physics aren’t too accurate (they run on a specific interval and if the server/client lags for whatever reason, it might not work too well).
The two other common methods I’ve heard were:
-
Raycasting
For slow/noninstant projectiles: Cast a ray starting from the part’s last position to its current position.
For instant projectiles: a single raycast in the direction of the projectile.
Pros:
- VERY fast
Cons
- only small projectiles (like guns), but if you need to you can just use multiple raycasts to simulate a 3d hitbox.
(image by RuizuKun_Dev I think)
-
Shapecast (sphere/blockcast) Introducing Shapecasts
This is a raycast, but instead a 3d object. I personally don’t use these, because I prefer using the next the next method. -
GetPartsInBounds (or if you want GetPartsInPart)
This lets you find whatever is inside a 3d region.
Pros:
- Supports getting multiple objects
- Much more accurate than using multiple raycasts
Cons
- Uses more performance
That’s all I know. Hope it helps!
