How to stop character when collide an object

Hello guys, I don’t know how to stop my character when he touches another object. I tried to put some point and when the character position is really near the point I stop him.
You can visualize my issue : https://issammerikhi.vercel.app/

Thanks for help

Three-mesh-bvh can handle character collision really well.

https://gkjohnson.github.io/three-mesh-bvh/example/bundle/characterMovement.html

This example provides a good jumping off point.