# Trying to use glb mesh with createNavMesh() doesn't work

**URL:** <https://forum.babylonjs.com/t/trying-to-use-glb-mesh-with-createnavmesh-doesnt-work/24344>\
**Category:** Questions\
**Created:** [October 6, 2021, 6:42am UTC](https://forum.babylonjs.com/t/trying-to-use-glb-mesh-with-createnavmesh-doesnt-work/24344 "2021-10-06T06:42:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASKICK\_Team](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/askick_team/32/19009_2.png) [@ASKICK\_Team](https://forum.babylonjs.com/u/ASKICK_Team)\
**Post date:** [October 6, 2021, 6:42am UTC](https://forum.babylonjs.com/t/trying-to-use-glb-mesh-with-createnavmesh-doesnt-work/24344/1 "2021-10-06T06:42:43Z")

</div>

Hello! I’m trying to use createNavMesh() with an imported glb mesh (the mesh was imported using SceneLoader.ImportMesh) but I receive ‘Could not build Detour navmesh.’  
I want to specify that first I merged the meshes and then pass them to createNavMesh()

This how I used the functions.  
SceneLoader.ImportMesh(undefined, ‘/assets/scenes/’, ‘world.glb’, this.scene.instance, (meshes) =\> {})  
this.navigationPlugin.createNavMesh(this.navMeshes, this.navmeshConfig, (navmeshData ) =\> {})

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [October 6, 2021, 7:24am UTC](https://forum.babylonjs.com/t/trying-to-use-glb-mesh-with-createnavmesh-doesnt-work/24344/2 "2021-10-06T07:24:01Z")

</div>

Hi @ASKICK_Team and welcome to the forum

Can you please share a playground so I can take a look?

---

<div class="post-metadata">

**Author:** ![ASKICK\_Team](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/askick_team/32/19009_2.png) [@ASKICK\_Team](https://forum.babylonjs.com/u/ASKICK_Team)\
**Post date:** [October 6, 2021, 2:03pm UTC](https://forum.babylonjs.com/t/trying-to-use-glb-mesh-with-createnavmesh-doesnt-work/24344/3 "2021-10-06T14:03:49Z")

</div>

[https://playground.babylonjs.com/#TN7KNN#52](https://playground.babylonjs.com/#TN7KNN#52) I think this should show the problem. I think the problem is more with the MergeMeshes than with the navigationPlugin

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 6, 2021, 2:48pm UTC](https://forum.babylonjs.com/t/trying-to-use-glb-mesh-with-createnavmesh-doesnt-work/24344/4 "2021-10-06T14:48:02Z")

</div>



---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 6, 2021, 2:48pm UTC](https://forum.babylonjs.com/t/trying-to-use-glb-mesh-with-createnavmesh-doesnt-work/24344/5 "2021-10-06T14:48:23Z")

</div>

@Cedric you are rocking the forum !!! thanks a lot

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [October 6, 2021, 3:06pm UTC](https://forum.babylonjs.com/t/trying-to-use-glb-mesh-with-createnavmesh-doesnt-work/24344/6 "2021-10-06T15:06:30Z")

</div>

Indeed, ` __root__ ` was used for mergeMesh and `createNavMesh` takes an array, not a single mesh.  
Once fixed:

[gltfmesht | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#TN7KNN#53)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 6, 2021, 3:16pm UTC](https://forum.babylonjs.com/t/trying-to-use-glb-mesh-with-createnavmesh-doesnt-work/24344/7 "2021-10-06T15:16:19Z")

</div>


