Hi, I’m trying to set up LOD on an imported mesh skull. I also add a pointer drag behaviour once the mesh has been successfully imported. https://playground.babylonjs.com/#ZJYNY#981
Then I add a Knot which should be an added level of detail for the loaded mesh.
The problem.
- Both the knot and skull are being displayed simultaneously irrespective of mesh distance from the screen
- The knot does not inherit the behaviour of the skull
How can I fix this? Thanks
There were a bunch of lines missing references on the onSuccess callback: fff | Babylon.js Playground (babylonjs.com)
I think it should have displayed errors on the console for these, I’ll take a look to see if this part is a bug.
1 Like
Hi @carolhmj Thanks for the update.
I adapted it a bit to use two imported meshes, and not the knot. The problem now is they both still display (both the main mesh and its LOD at the same time). https://playground.babylonjs.com/#ZJYNY#992
I cracked some of the mystery and @RaananW cracked the rest, firstly, the first element of the meshes
array is an empty element (this comes from the GLTF file itself), so you have to add meshes[1]
instead, and secondly, the meshes have to be the same dimensions!
fff | Babylon.js Playground (babylonjs.com)
(By the way, LOVE your username, Ancient Mesopotamia history is so cool.)
3 Likes
Thanks for cracking it.
I chose the name to honour BabylonJS 
4 Likes