Attention to lines:
// scene.createOrUpdateSelectionOctree();
BABYLON.MeshBuilder.CreateBox("box", {size: 1}, scene);
// scene.createOrUpdateSelectionOctree();
it’s provide to expected behavior:
But when we add a box after createOrUpdateSelectionOctree:
scene.createOrUpdateSelectionOctree();
BABYLON.MeshBuilder.CreateBox("box", {size: 1}, scene);
// scene.createOrUpdateSelectionOctree();
the result is not expected:
But it is to exist in the Inspector:
And it’s become visible only after the second run of createOrUpdateSelectionOctree:
scene.createOrUpdateSelectionOctree();
BABYLON.MeshBuilder.CreateBox("box", {size: 1}, scene);
scene.createOrUpdateSelectionOctree();
I didn’t found anything about this behavior in the docs Optimizing With Octrees | Babylon.js Documentation
So, is this a bug, or all is fine?