Mesh Clone then Flip Normals

I am attempting to clone a mesh and then flip the normals of that second mesh.
https://www.babylonjs-playground.com/#M4VPSK

However, it seems that cloning isn’t doing the deepest clone, as calling .flipFaces(true) shows both meshes seems to be using the same vertex buffer perhaps?

Is there a way to clone the buffers? The reasoning for this is I am trying to create a tube with a double sided mesh, but I want to update the positions buffer of that tube randomly based on the normal. This works okay for the outer mesh, but the inner mesh I have to flip the normals and it just gets weird/complicated and doesn’t seem to match up perfectly.


I suppose I could just create 2 objects at once and then set one to have a different side orientation, just was hoping a clone would do all of that for me.

It looks like you can clone the geometry as well to get your desired behavior, see this playground https://www.babylonjs-playground.com/#M4VPSK#2

1 Like

Or
tube2.makeGeometryUnique();

3 Likes