Collisions with concave mesh collider don't work on iOS

I am having a problem with collisions not being detected between sphere collider and a mesh collider, but only when I run it on iOS. Everything works fine in the editor and in os x build. The setup is that a ball with rigid body should fall on an object with custom mesh collider, but instead it passes through. The ball is not moving very fast. Also on iOS the problem happens randomly, for most of the times there is no collision, but once every 10 or so restarts it works fine. Problem also seems to affect only mesh colliders with concave meshes and not convex ones (and I mean an actual shape not a collider setting).

I’ve been trying the following things and none of them worked:

  • Setting convex on a mesh collider.
  • Attaching kinematic rigid body to mesh collider.
  • Making mesh collider static.
  • Setting “Continous” and “Continous Dynamic” collision detection.
  • I double checked layers collision matrix.
  • None colliders are triggers.
  • Normals on my mesh are pointing out, I tried “Calculate” normals in import settings.
  • In my test project one collider is very thick.
  • Decreasing fixed time step and time scale in TimeManager.
  • Decreasing Default Contract Offset in PhysicsManager.
  • Increasing Solver Iterations and Solver Velocity Iterations PhysicsManager.
  • Setting “Prebake collision meshes” in PlayerSettings.

I created a simple test project that demonstrates the problem.

2990730–222681–collision-test.zip (118 KB)

I have this problem too, the bug happens even with convex colliders, and only on iOS, more info in my thread:

I’ve opened a bug two monthes ago: Unity Issue Tracker - [iOS][Physics] Two MeshColliders pass through each other at certain angles on iOS only

Thank you very much! I went through all the phases of denial, anger etc. with this issue and I really hoped it’s just a bug in unity. If the bug is filed than I’ll trust they will resolve it eventually. And downgrading to Unity 5.4 is still an option for me. Thanks again!

Yeap, I hope they will fix it as well, I believe physical bugs must have some priority, because they affect game very heavily, and produce a lot of additional bugs. But bug has open state two months already, so my hope is melting.

Also, I recommend you downgrade to Unity 5.4 as soon as possible, because once you save scenes/prefabs with Unity 5.5, you will not be able to reopen them with Unity 5.4 - this is a big deal in my situation now.

Unity 5.4 it is! Thanks again for advice.

Hm interesting… I’m using a similar setup with a sphere rolling on all kinds of mesh colliders, but I didn’t encounter any problems with Unity 5.5, the problem however starts to appear (for not only concave meshes) in Unity 5.6 beta (tested with b11) once the sphere has a certain velocity (rigidbody is set to continuous dynamic detection).