# Imported mesh with lod and pointer drag behavior

**URL:** https://forum.babylonjs.com/t/imported-mesh-with-lod-and-pointer-drag-behavior/26978
**Category:** Questions
**Tags:** lod
**Created:** [January 21, 2022, 9:14am UTC](https://forum.babylonjs.com/t/imported-mesh-with-lod-and-pointer-drag-behavior/26978 "2022-01-21T09:14:27Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![nebuchadnezzar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nebuchadnezzar/32/21399_2.png) [@nebuchadnezzar](https://forum.babylonjs.com/u/nebuchadnezzar)
#### Post date: [January 21, 2022, 9:14am UTC](https://forum.babylonjs.com/t/imported-mesh-with-lod-and-pointer-drag-behavior/26978/1 "2022-01-21T09:14:27Z")

</div>

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](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

---

<div class="post-metadata">

### Author: ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)
#### Post date: [January 21, 2022, 1:27pm UTC](https://forum.babylonjs.com/t/imported-mesh-with-lod-and-pointer-drag-behavior/26978/2 "2022-01-21T13:27:37Z")

</div>

There were a bunch of lines missing references on the onSuccess callback: [fff | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#ZJYNY#983)

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.

---

<div class="post-metadata">

### Author: ![nebuchadnezzar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nebuchadnezzar/32/21399_2.png) [@nebuchadnezzar](https://forum.babylonjs.com/u/nebuchadnezzar)
#### Post date: [January 21, 2022, 2:53pm UTC](https://forum.babylonjs.com/t/imported-mesh-with-lod-and-pointer-drag-behavior/26978/3 "2022-01-21T14:53:57Z")

</div>

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](https://playground.babylonjs.com/#ZJYNY#992)

---

<div class="post-metadata">

### Author: ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)
#### Post date: [January 21, 2022, 6:23pm UTC](https://forum.babylonjs.com/t/imported-mesh-with-lod-and-pointer-drag-behavior/26978/4 "2022-01-21T18:23:17Z")

</div>

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)](https://playground.babylonjs.com/debug.html#ZJYNY#995)

(By the way, LOVE your username, Ancient Mesopotamia history is so cool.)

---

<div class="post-metadata">

### Author: ![nebuchadnezzar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nebuchadnezzar/32/21399_2.png) [@nebuchadnezzar](https://forum.babylonjs.com/u/nebuchadnezzar)
#### Post date: [January 21, 2022, 6:29pm UTC](https://forum.babylonjs.com/t/imported-mesh-with-lod-and-pointer-drag-behavior/26978/5 "2022-01-21T18:29:24Z")

</div>

Thanks for cracking it.  
I chose the name to honour BabylonJS 😁
