intersectsMesh get point

Hi All,

I have a line that is rotated and when it intersects another mesh, i want to work out the distance between the intersection point and the centre of another mesh.

The demo i have below may help explain this better
https://www.babylonjs-playground.com/#9YBQU1#12

so while the white line hits a cube I want to work out the distance between the intersection point and the centre of the cube.

Hi @codeiain and welcome to the forum. You need to use a raycast . Have a read and come back if you need more help.

@JohnK Thanks Raycast worked perfectly

1 Like