Check for collision with mesh itself or its edges rather than boundingBox?

https://playground.babylonjs.com/#RMG611

In my PG I can cut meshes and merge them (atDragEnd-Event). The problem is, when I merge two meshes, they get a big boundingBox that has a lot of empty space inside it,

When I move the left wood to the empty space inside of the big boundingBox they get merged because their boundingBoxes are colliding…

…Which I don’t want. Is it possible to merge meshes on actual collision (Not bounding Boxes) or on edges-collision?? Or is there another solution for this? I’m trying to solve this the whole day, any help is appreciated, thanks in advance

Hey!
instead of relying on bounding boxes collisions you can use mesh.intersectsMesh(otherMesh) maybe?

But that’s what I’m doing now - see line 128.

Ha rats, you are right! Then the only way is to compare all triangles :frowning: which can be pretty slow

In this example the collision happens on the actual mesh, but I don’t understand why? Is it because of moveWithCollisions() or why?

Move With Collisions will impersonate the mesh with an ellipsoid and use to collisions with other meshes so it will be more precise:)