Mesh intersections

Hello,

I am trying to detect the intersection of a mesh created in Babylonjs with a mesh from an imported GLB.

It doesn’t detect intersections, as seen here:

I tried looking up information on this and this is the closest I could find, but I couldn’t find a solution.

Does anyone have any insight into this and can explain?

Hey there, intersectsMesh() relies on the world matrices being up-to-date. So since the positions of sphere and sphere2 were changed I called computeWorldMatrix(true) on those meshes to update their world matrices and then both intersections are detected. :slight_smile:

2 Likes

Ah thank you!

I tried computerWorldMatrix, but I didn’t pass in true so it didn’t work.

1 Like