- Home /
Does disabling colliders increase performance?
Hey.
The title says it all:
Does it improve performance to disable collider components (they have an enable/disable flag in the inspector since some versions, like script components with update functions)? Does it stop all physics calculations? I wasn't able to find anything in the documentation.
Thanks.
Ok, tried it out myself in an empty scene with ~2300 small objects (210 triangles each) with $$anonymous$$eshColliders and the Fist Person Controller prefab.
Disabling the $$anonymous$$eshColliders didn't bring down the frame rate significantly, but in the Profiler, it brought the Physics.Simulate task down from 11.2% to 0.7%...
so definitely an impact.
Would be nice though if anyone new more about what disabling of colliders does actually do!
Did some further research, and found this very nice performance comparison by DoktorAce (Thank you!): http://answers.unity3d.com/questions/209582/remove-collider-vs-putting-on-a-layer-that-ignores.html
Answer by eaglemaster7 · Feb 27, 2012 at 11:19 AM
yes but a little bit i think, you can notice on profiler how much resource on physic is used..
Answer by Dreamside · Feb 27, 2012 at 12:01 PM
I suggest that if those objects will not physically interact with other game objects, you should remove collider component. It will increase game performance.
It's a special case: I want to keep the connection to a prefab that contains the collider component. Removing components will destroy the link, disabling them wont.
Your answer
Follow this Question
Related Questions
Box collider vs Quad(mesh) collider 1 Answer
Very complicated collider problems 0 Answers
changing gravity OnTriggerEnter 1 Answer
Tilemap Collider 2D preventing objects from moving 2 Answers
object collision does not work 2 Answers