- Home /
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?
Answer by loopyllama · Sep 20, 2011 at 06:41 PM
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.
Your answer
Follow this Question
Related Questions
Use trigger collision or position check? 1 Answer
Intersects() vs OnTriggerEnter2D performance 0 Answers
OnTriggerEnter No effect 1 Answer
2D game object trigger 1 Answer
Using a trigger to align an object? 1 Answer