colliders performance

alt text

What is the most efficient way to make a simple wall using colliders?

  1. Create a mesh collider from a simple model (there are 6 triangles for this example).
  2. Create several box colliders that describes the wall (3 for this example).

Actully the question is what is more efficient in Unity: to calculate one box collision or one squad (two triangles) collision?

ps. I understand the complex meshes should collide using simplified geometry or even box collider when no need to calculate the collision precisionly.

upd. In my case I mean “one vs many” collision scheme, not “many vs many”. This means smth like I got a hero (one hero) and he should collide with walls.2.2.

Box colliders are always better for performance as they use broad phase collision detection. Mesh colliders use narrow-phase collision detection which is significantly more computationally costly and in most case unnecessary.