- Home /
Where and when to avoid using mesh Colliders for performance issues.
Hello everyone! I am developing a mobile game and new to mobile development. I have a prehistoric scene where all around are rocks, I would prefer to have mesh colliders for those rocks..
I tested both box colliders for all my rocks, then mesh colliders. I am using the profiler as a reference, but I didn't see much difference in GPU/draw calls, niether in the memory section. I need to know, when to avoid using mesh colliders, or what part I overload with mesh colliders.. Just knowing box colliders are lighter would'nt help me. Thank in advance
Answer by whydoidoit · Dec 29, 2012 at 04:34 PM
Mesh colliders are expensive for collision resolution and ray casting (the impact would appear in Physics)
Mesh colliders are also subject to back face culling and need to be convex to collider with each other.
Your best bet would be to approximate the shaped of the rocks using multiple primitive colliders.