Mesh Intersection is not trigger when one mesh is too fast

Hello! I’m currently working on a game where I need to check if a mesh has intersect another one.

Everything seems to work fine except when one mesh go faster. At the moment, I’m simply moving a mesh position in the scene.onBeforeRenderObservable like this :

mesh.position.y += (scene.deltaTime /1000 * mySpeed)

Sometimes, according to the mobile device, it might skip some frames. Since the mesh is a bit small, it does not trigger. Is there a way to get a fixed framerate to avoid skipping any frame or simply having a better solution.


Maybe some average like RollingAverage is enough for you:

Also check out:

Or reduce overall scaling (i.e. mesh sizes), so you can decrease your speed value.