Quick clarification (re. collisions & performance)

Hi there, so I know toggling “Can Collide” on parts is more performance efficient, is this the case with “Can Touch” too?

I’m presuming touch is for collision-detection events and not physics interactions, but if I’m misunderstanding this please clarify :slight_smile:

Many thanks!

1 Like

The CanCollide property of a part determines whether an object that touches it will either move straight through or collide with the part. If you have a part that a player will not touch, or will not be touched by any moving parts, it would be best to set the CanCollide property of that part to false, so the physics do not need to be calculated for it. As for CanTouch, I believe it determines whether a “touched” event will fire when the part is touched. If you do not plan on scripting the part with touched events, then I would recommend setting it to false, as it will also improve performance.

3 Likes

Near enough what I believed, but hadn’t anything to back that up. Thanks!

1 Like

As a fan of statistics and math, I was curious if anyone knew the exact performance difference between, say, 100 parts regularly vs 100 parts with collisions/touch events disabled?

While I don’t know the exact differences, the 100 parts with CanCollide and CanTouch disabled is more efficient.

You can read the entire topic here. But essentially anything with CanCollide and CanTouch disabled is more performant than not. The screenshot I posted is from a Roblox Admin responding to my question about how much performance is being saved.