OnTriggerEnter vs distance check in Update

I need to make some triggering zones. So I faced the question, if it is better to:

  • use OnTriggerEnter() using collider ( like BoxCollider ), with a layer and a physics matrix set to detect only the objects that I’m intrerested in , without any unnecessary objects,
  • or loop over all objects that would be stored in some static List in Update() method and check each objects position manually?

Lets say that I’ve got like 100 objects to be scanned, and about 30 triggering zones.

To my opinion the first solution should be faster, because of many optimalizations that the physics engine does. Am I right?

i had the same kinda question, so what i did; i used a co-routine and made it run twice a sec, so it is much faster then any other thing. if u want faster, u can run that 4 times with delay of 0.25 seconds :slight_smile: