Detect when LOD parent is selected

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.

Here is a playground.

I am expecting there to be a green sphere visible when the brown torus is visible.

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

Nope you are right! this is a bug :slight_smile:
will be fix by next nightly!

Thanks a lot

1 Like