I cannot figure out how to determine when the mesh that adds other LOD meshes to it is selected.
It seems that when distance is less than the smallest LOD distance, the selected mesh returned is not the original mesh, but the first level.
I am expecting there to be a green sphere visible when the brown torus is visible.
–Edit–
So, if I attach a onBeforeRenderObservable
and do knot00.getLOD(camera)
in there, it outputs the results I would expect. Perhaps this is a bug? If not, is there any performance difference between attaching to the beforeRender event vs the onLODLevelSelection
function?
Here is a playground showing it working with onBeforeRenderObservable