# Wrong size of navMesh.addBoxObstacle()

**URL:** <https://forum.babylonjs.com/t/wrong-size-of-navmesh-addboxobstacle/50146>\
**Category:** Bugs\
**Tags:** navmesh\
**Created:** [April 29, 2024, 2:21pm UTC](https://forum.babylonjs.com/t/wrong-size-of-navmesh-addboxobstacle/50146 "2024-04-29T14:21:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yedpodtrzitko](https://avatars.discourse-cdn.com/v4/letter/y/a9a28c/32.png) [@yedpodtrzitko](https://forum.babylonjs.com/u/yedpodtrzitko)\
**Post date:** [April 29, 2024, 2:21pm UTC](https://forum.babylonjs.com/t/wrong-size-of-navmesh-addboxobstacle/50146/1 "2024-04-29T14:21:45Z")

</div>

Hi,  
when adding dynamic obstacle via `addBoxObstacle()`, the size of given obstacle feels incorrect. See the PG example below - there I created a visible mesh via `CreateBox()`, and then an obstacle with same width. But when agent navigates around the box/obstacle, the chosen path is not following the size of mesh. I dont think it’s because the agent parameters, because the agents travels around the “height” dimension of the box as expected.

> **[Babylon.js Playground](https://playground.babylonjs.com/#GMY43B)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![yedpodtrzitko](https://avatars.discourse-cdn.com/v4/letter/y/a9a28c/32.png) [@yedpodtrzitko](https://forum.babylonjs.com/u/yedpodtrzitko)\
**Post date:** [April 29, 2024, 2:38pm UTC](https://forum.babylonjs.com/t/wrong-size-of-navmesh-addboxobstacle/50146/2 "2024-04-29T14:38:41Z")

</div>

It seems like when I divide the obstacle size by two, then the dimensions match the visible mesh 🤔. And I guess that’s because the parameter name is actually called `extent` rather than `size`, so that might be expected behaviour.
