Physics collision still not working

In the playground above, I used Ammo Physics Engine to detect collision between two meshes, but it doesnt stop registering collision even if the objects in collision are already touching one another. I wanted the ball to stop changing colors even if the ball still rolls.

Here is one of possible solutions -

thanks, bro.
but it doesnt read it the second time it collides with the ground. Im only trying to distinguish between the ball moving on the mesh to the ball clearly hitting it. Impulse kinda thing, no one seems to have an answer for it it in my previous post

Hey @TheScientist,
As I understand your case you want to distinguish the bouncing collision from the rolling collision.
The naive implementation would be to check the y position of the sphere, something like these:

I took the 1.11 by trial and error.

cc @Cedric

Once distance and normal in collision callback for ammojs by CedricGuillemet · Pull Request #12986 · BabylonJS/Babylon.js · GitHub has been released, you 'll be able to check the penetration distance.
But for the physics engine (at least for Ammo), there is no conceptual difference between a body rolling on a plane and having collision detection each frame.
It’s the same bahvior: a collision and a response. having the sphere not boucing doesn’t mean it’s not a collision.