Hello community,
I'm new to babylonjs and I have a question concerning to the collision detection of holes in meshes. I want to recognize that a sphere flies through a hole (any kind of shape possible).
I prepared a example with an cylinder which contains some holes (different shapes) at a random position. A sphere is moving up and down to collide with the cylinder and I want to know, if that sphere collides with a hole or with the surface of the mesh object.
https://www.babylonjs-playground.com/indexStable.html#1ZQS9W#6
At the moment, the collision with the mesh object changes the color of the sphere on any 'collision'. My goal is, that the sphere changes the color only passing/flying through a hole, but the holes can be random positioned and could also have a random shape.
It would be great if you guys can help/teach me how to achieves this.