Hello,
I’m currently working on collision detection. I have some NPC and I need to detect when there is a wall or an obstacle to make them stop or jump.
It’s quite easy to achieve. I use a trigger that I put in front of them to collide with the wall or obstacle and activate a script.
But I could do the same by using Physics.CheckBox in the Update method to see if I collide with something. My question is what is more performant generally speaking , having a GameObject with a collider/trigger and using the OnCollider/Trigger method to call a function or using the Physics class to handle this kind of collision.