Mesh bounding with custom shape for collision

Hi!

Is it possible to use mesh bounding for Intersect Collisions considering not a box shape, but a custom shape? For example, I have a triangle and I would like that another mesh object is not intersecting the triangle while it crossing nearby.

Thank you in advance.

Hi @Mikhail_Malgin and welcome.

For a simple triangle and a relatively small sphere you could use Ray - Babylon.js Documentation by creating a ray from the sphere in the direction of travel and seeing where it hits the triangle, if it is more than the radius away. For a larger sphere you could increase the triangle size by adding the radius of the sphere to each side.