Rotation after union in place

Hello to everyone,
i have a problem after a union in place.

I have 4 polygon, i union them in place to a mesh, after this operation, if i do a rotation of the whole mesh some piece are not aligned

Why? How can i do a more “solid” mesh after union?

here the code where i do union

                        const m1 = BABYLON.CSG.FromMesh(obj_libraries[u].oggetti[0]);
                

                            if (obj_libraries[u].oggetti.length > 1) {
                                for (ew = 1; ew < obj_libraries[u].oggetti.length; ew++) {
                                    let m2 = BABYLON.CSG.FromMesh(obj_libraries[u].oggetti[ew]);
                                    m1.unionInPlace(m2);
                                }
                            }

                        meshSubtr_un = m1.toMesh("substr", mat_red, scene, false);

I don’t really understand your problem. You should provide a repro in the playground so that we can understand better and try to help more.

1 Like