I’m trying to build a dice roller, and so far it works well. But I don’t know how to detect body stillness. At the moment, I detect the roll result after a fixed amount of time, but some dice may still hang (especially when there are many of them). I have seen demo (in Three.js) where they change the color of the mesh when it is physically stable, so it should be possible somehow, but I didn’t find any Babylon.js example for that.
Side question: what engine are you guys using for physics? For the dice roller, it seems that Cannon is the more accurate, but it is also the slower (on my rather old laptop 50 dice are enough to drop FPS below 5). Oimo is the fastest but have weird behaviors. Ammo is usually good, but here it exhibits strange and unnatural die friction/rotation. Cannon is just perfect for the job but very slow.
Also do those engines support running on a server-side Node.js? It’s to build a multiplayer games, and at one point I may want to prevent cheating.