Hi everyone,
When a Mesh has children meshes and we call clone() on parent Mesh then both parent and children meshes will be cloned.
But when we call createInstance() on same parent Mesh, then instance only for parent Mesh will be created.
If we want to create an instance with all children we have to run ‘for loop’ over original children, create instances for them and assign parent instance for all children instances.
Are there any benefits from using instances in this cases? Or it makes sense not to struggle and use .clone()? If I understand correctly, clonned mesh is still more optimized approach than creating new mesh from scratch? At least clonned mesh is not fully functional because it requires at least .makeGeometryUnique() for some manipulations (creating instances for example).
Also, parentMesh.isVisible=false; doesn’t affect children. Makes sense in most cases, but probably there is a way to control this behavior?
Here is a playground that demonstartes situation from my question: Babylon.js Playground