[SOLVED] Need some help with mesh collision

I am not able to produce a smooth collision with my mesh collision table surface and the balls with sphere collision. I tried to use a compound of multiple box collision instead but the result was not good when shapes overlapped. The sphere collision is reacting to every triangle or quad face like hitting a bump. Does anyone know how to adjust ammo.js to make the mesh collision of the table act like a smooth flat surface?


the table surface model is very simple.

Well, it is a bit of a challenge.

The easiest option is to try to tweak the contact offset. You can check this ticket for examples:

If that doesn’t work, then your other option is to separate your table surface into individual triangles in your modelling software, then import them all as separate meshes. Then create a compound collider with all of those triangles as children, forming a surface. And finally try to adjust contact offset again.

2 Likes

thanks! I have managed to make it work by adjusting contactProcessingThreshold to 0.00001

1 Like