Hi there,
I am trying to cut a hole through two different meshes with the with react-three-csg. Independently the Subtraction is working for both meshes it’s working. But if i have two meshes and Subtract, only one mesh gets the subtraction. Here is my Code:
<mesh
castShadow
receiveShadow
scale={[.000001, skalierungsfaktorHöhe, skalierungsfaktorBreite]}
position-x={-0.0001 - oberflächeBGSOffset}
>
<meshStandardMaterial
envMapIntensity={0.2}
map={oberflächeTB_BGS.map}
/>
<Geometry ref={csgBGS}>
<Base geometry={nodes.TuerblattBGS.geometry} />
<Subtraction scale={.5}>
<boxGeometry />
</Subtraction>
</Geometry>
</mesh>
<mesh
castShadow
receiveShadow
scale={[
skalierungsfaktorStärke,
skalierungsfaktorHöhe,
skalierungsfaktorBreite,
]}>
<meshStandardMaterial envMapIntensity={0.2} map={oberflächeTB.map} />
<Geometry ref={csg}>
<Base geometry={nodes.Tuerblatt.geometry}/>
<Subtraction scale={.5}>
<boxGeometry />
</Subtraction>
</Geometry>
</mesh>
For better understanding: there is a mesh for a door and a very thin mesh that just has the material of the other side of the door. Is there a problem, when those Subtractions interfere? Would be happy for any help. Here are images for better understanding:
the first Subtraction just gets ignored only the second one gets applied. If i change the order of the meshes in the code the other subtraction is displayed.