Picking invisible LOD element

Hello everyone!

in my project, I am making spheres by DoubleClick on the mesh. Spheres got 10x LOD. Only the sphere’s size is changing. When I want to make a sphere next to another sphere the sphere is being made on the invisible sphere from LOD. I did the playground on this problem but it works fine in there. :upside_down_face:

What could be the problem in my situation? I thought that invisible meshes from LOD should be unpickable.

This is really hard to tell without a playground :slight_smile: and Are you using the same version from preview.babylonjs.com ???

Ok, I did playground of this example :slight_smile:


Steps to reproduce:

  1. Click first button.
  2. Make sphere somewhere in the scene by doubleclick
  3. zoom to this sphere so it’s small and make another small sphere next to the first one.
  4. second sphere is being made in the “air” cus it’s being made on invinsible LOD sphere of the first sphere



same spheres in the img1 and img2, just moved the camera. The right sphere from Img1 should be made on top of the big grey sphere, but ray captures invinsble sphere from LOD

I tried to ignore meshes which names contains “sphere_lod_…” (names of LOD spheres) but I need possibility of picking those meshes in my application to put gizmos on it. So what I need is to make invisible spheres from LOD to be isPickable=false

You can perhaps use mesh.onLODLevelSelection to change which mesh is pickable? Though, if what you want to do is put gizmos on your selection, I’m not sure that’s what you want to do. It seems like if you want gizmos, you should put it on some kind of container parent node so that all the LOD meshes will be affected by the gizmo?

I guess gizmo doesn’t make the problem here. I think LOD elements should be unpickable when they’re hidden.


I made those spheres in this order: 1, 2, 3.

It cames out that sphere number 2 is made on sphere number 3 (on hidden LOD element). Sphere number 3 is made on sphere number 2. They all should be made on the big grey sphere.

From the different angle:

I guess your solution gonna work and I’m going to implement it ( the one with mesh.onLODLevelSelection

but I guess it could be considered as a bug?

I mentioned the gizmos because I’m trying to understand your scenario. Typically LODs have relatively the same size, so I’m not exactly sure what you are trying to do.