What is the best method for detecting objects that collide?

I’m making a game in which the player can use bombs and throw them, for the explosion though, I will need to collect data on how many parts in the blast radius part where touched, and what they were.

I heard about Region3 and many other modules that should be used over the default Roblox touched events, so what should I choose?

If you’re using an Explosion object, you can use the Hit event, it gives the Part that touched the explosion. Insert the parts into a table and get the length using the length operator.

I’m actually using explosion particles for this, so I’m going to have to use a part.

TL;DR: try using touched first for detection especially for a low speed bomb as in your description.

I believe the misconception here is that .Touched is only unreliable because it uses the physics engine which has a tunneling problem for parts that fly fast such as a bullet which is what was used by games in the past which had spherical bullets.

If the projectile flies at a low speed like a bomb or the classic roblox rocket launcher (60 studs per second).Touched should be good enough.

If the projectile is faster and you are having issues with .Touched then you can manually consider implementing something more complex like sweep collision detection with region3 or area based methods like the above game stack exchange question.

1 Like

Oh, then a touched event would be fine, no extra work needed.

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