@Cedric please have a look at this code ! I need your help. The animation doesn’t work after I made it physical
Impostors with mass == 0 are static, you can’t animate them.
MeshImpostor can only be static, so you will have to change the impostor to a dynamic one (cylinder, box, …)
Then, to animate the rigid bodies, I suggest to use setAngularVelocity. With an appropriate damping, angular velocity will stop after a while.
This brings another issue: if everything is dynamic, you will have to attach those rigid bodies (with a joint) are everything will fall appart.
Another, easier solution is to fake a part of the physics: keep everything static but when the ball collides with a static object, add an impulse. Magnitude of the impulse being reduced over time.
So… can you send a link to a PG with working animation ? (I just haven’t understood your idea …)
So how will I be able to rotate the spots (spin roulette) and move a ball like in real casino roulette ?
Ball falls through roulette | Babylon.js Playground (babylonjs.com)
Maybe you should start smaller with a fake impulse quad and collision detection and then add elements one by one.
But can I set mass to 1, for example and under my object create some support-element with mass 0. And then use animations ?
Because it looks too complicated for me, and I have only today and tomorrow to finish my application
I have work to do as well. I can answer questions, debug PG and give some hints but I can’t code the application for you
@user_of_babylon I guess you need to learn step by step by going through the doc and reading previous forum posts. We are always glad to help but we can not code the app for you.