Enabled physics in the scene (used this.scene.enablePhysics(new BABYLON.Vector3(0, -9.81, 0), new OimoJSPlugin()) ), made all checkCollision to true , created MeshImpostors . But my ball for roulettte (also created in 3Ds Max ) falls through the roulette. It doesn’t fall through a ground, if to create in Babylon such, but just jumps on it, so physics is seem to be enabled… Also my roulette doesn’t fall itself even if to give it a mass = 10 (so physics doesn’t work with my roulette). So can you help me ? I can’t find a solution
For some reason the mesh impostor does not work for the roulette: if you use another type of impostor, you don’t get any error (but the ball still does not collide with the roulette).
Adding @Cedric as I know nothing of physic engines.
So… what can I do to quickly enable physics ? May be I can go through all scene meshes (for of scene.getChildMeshes()) and do mesh.parent = null, make impostor for every ? What can you suggest ?
Yes, that’s a possibility. With collision callback, you’ll be able to detect the rectangle the ball is over.
I don’t how how performant it will be but I think it’ll be alright.
@Cedric , help, how now I can animate it ? Roulette must spin and it spinned. But now physics works (thank you for it a lot), but it now doesn’t spin via animation… It also doesn’t spin even if I change spots.rotation in window.setInterval