Gap between mesh colliders.

Hello,
I have a problem with a collision between a static mesh and a convex mesh. The collision as it is works, but it seems to be inaccurate. I am always left with a gap between the meshes. I am quite new to Unity, so sorry if this is a dumb question. This is what I have done:

  1. Created static game object with a non-convex mesh collider.
  2. Created Rigidbody game object with a convex mesh collider of the relevant part.
  3. Applied a velocity to the Rigidbody and moved it up against the static game object.
  4. Visualized the collision with Debug.DrawRay() in the OnCollisionStay() function

This is what I got: → Gif
7961742--1020489--Collisiongap.gif

For some reason, there is always a gap between these elements. I don’t know why. I have tried out different collision detection modes and cooking options of the mesh collision. Still nothing different. Thank you for your help.

Marco

how big gap is that? hard to say from image if its 1m or 1mm or something else?

in phys settings, theres at least this offset value,
7961751--1020501--upload_2022-3-14_11-41-52.png

1 Like

Thank you for your help! I messed up the units while import. Therefore, the whole project was way too small and the Contact offset was just too large for this scale. Now it’s scaled reasonable and works fine. Thanks!