Thin Instance Source Object Visibility

With regular instances the docs say to set mesh.isVisible = false; so that the source mesh is invisible, when I do this to the source mesh for thin instances, the thin instances don’t appear. If I comment out that line I get the thin instances, but the source mesh appears at the origin.

Is this expected behaviour, how can I have the thin instances visible, but the source mesh invisible?

You need to have mesh.isVisible = true (the default value) for thin instances to be visible.

The source mesh should not be visible unless you explicitly add its matrix.

Here is a perfect example from the documentation that illustrates this: Babylon.js Playground

On line 30, the source mesh’s matrix is added with sphere.thinInstanceAddSelf(), so it should become visible after that. However, on line 34, it is overridden by replacing it with matrix2 defined on line 32.

I think I’ve figured it out, I was loading the meshes (glb files), but they weren’t necessarily being used, if they weren’t used then they appeared at the origin. I am now setting mesh.isVisible = false; when they are loaded, and then later when they are used as the source for thin instances, I am setting mesh.isVisible = true;