Using trigger is slower than collision? why?

I have a few hundred spheres with collider on screen. When I checked the box “is trigger”, framerate slows down a lot.

I would think OnCollisionEnter() and OnTriggerEnter() is very similar, why using trigger(i.e.OnTriggerEnter()) is slower than using collision(i.e.OnCollisionEnter()) so much?

On my brief test, triggers work at the same speed as colliders. Are you sure both your OnEnter implementations are equal?

1 Answer

1

tough to say without more info. here are some guesses. triggers can collide with more types of colliders, see the collision action matrix for details here: http://unity3d.com/support/documentation/Components/class-BoxCollider.html. Perhaps the code inside of the called function is different? For instance including the argument of Collider other will result in extra processing.