In the above playground, I created a MeshImpostor for my roulette table. My glb model is made up of 16 some odd meshes. The model is loaded in two parts, first the meshes that will not be rotating, and then the meshes that will be rotating.
Now, when I drop a bunch of roulette balls on top, some of them pass straight through my meshes! Based on my testing, there is no one particular spot where the spheres fall through, they just fall through completely at random!
This is an extremely weird bug.
Any insight @Cedric? I hear you’re a physics wizard.
This happens because time steps doesn’t allow the physics engine to properly determine collision. If an impostor moves too fast, it’s in front of the collider at 1 frame, then at the back the frame after.
To fix it, you can add substeps:
I tweaked your PG:
MeshImposter semi-permeable? | Babylon.js Playground (babylonjs.com)
Beware, the more substeps, the slower. You can also lower the impostor speed so collision detection will be more robust.