I had thought that you couldn’t set a mesh collider to be convex for meshes with over 255 triangles.
But in Unity 5.6, I’m able to set mesh colliders to convex for models with a much higher triangle count.
For example, I have a table made up of 6 rounded cubes, and the total triangle count is 25920.
But in the editor, I’m able to set the mesh collider to be convex.
See?
The documentation says this:
"Convex Mesh Colliders are limited to 255 triangle"
So what I believe is happening is that it doesn’t matter how many triangles the mesh has, it only matters how many triangles the generated collider has. In the above example, the high-polygon table is wrapped in what looks like a fairly low triangle convex collider. Is this correct? If so, I have a question:
How can we tell (from code) whether or not a collider can be successfully set to be convex? It seems that we can’t rely upon the mesh triangle count to determine this. What I’m trying to do is set the colliders to convex if this will work, and if not, Destroy the mesh collider and add a BoxCollider instead.
