Is it possible to filter collisions by ID without incurring a call to OnTrigger/Collision?
Like say:
only objects with ID 1 collide with each other, ignore all other ids
only objects with ID 2 collide with each other, ignore al other ids
I know people are handling this inside of OnTrigger/Collision - I’m wondering if it’s possible without the overhead incurred by the function call & any internal processing
Edit → Project Settings → Physics
Use the checkboxes to allow/disallow collision between layers.
- Set up some layers
- Give your rigidbodies the desired layer (top section of Inspector pane)
- ???
- Profit
No functions, no overhead. Very clean actually 
1 Like
this forum appears to be broken. someone answered this a few days earlier but their answers are not showing here. I can see them if I click my Alerts. weird
Ohh I see it now… there is a double posting down the list.