Creating inelastic collisions? Restitution does not work

In the video, we can see the ball is bouncing in between the two gray separators like crazy because of the rotation of the roulette table. This should not be the case as the ball has a restitution of 0 and a very large mass. I tried with the seperators with mass 0 and 1 and the same behaviour occurs.

Code to create ball:

ball.physicsImpostor = new PhysicsImpostor(ball, PhysicsImpostor.SphereImpostor, { 
            mass: 2000, // usually is 20
            restitution: 0,
        }, scene);

Code for the separator mesh:

m.physicsImpostor = new BABYLON.PhysicsImpostor(m, BABYLON.PhysicsImpostor.MeshImpostor, {
                mass: 0
                friction: 0.45, restitution: 0
            }, scene) 

@Cedric, Would appreciate your help!

I would trye a few things:

More iterations per frame will make the ball less bouncy

  • add more damping
    Each frame, get the linear velocity and set it back with 99% of its initial value.
    I’m not sure this will work correctly but I would try

My guess is the ball is bouncy because the penetration is too important and the collision response pushes the ball too fast.

Hello @krpaul just checking in, was your question answered?