I have a problem when i want to make the intersection of 2 meshes, a box and a polygon
here’s the playground : https://playground.babylonjs.com/#WM8ZHJ#1
the color of the polygon is red.
the color of the box is green.
the intersection mesh color is blue
I don’t understand why the intersection mesh includes the upper side of the box.
Someone could help me ?
Do you want to get rid of this piece? The blue one?
Yes, I only want to keep the “real intersection” of the two meshes and delete also the upper side of the blue mesh
All your meshes/materials must use the same side orientation (and I’m not sure anything different from FRONTSIDE will work with CSG).
So, you should remove
sideOrientation:BABYLON.Mesh.DOUBLESIDE from the polygon creation and make sure the vertices are listed with the right winding. It seems that inverting the creation of the vertices in
pts and inverting the loop
//base en bas make it work: