# How do I correctly spawn NPCs on a Nav Mesh without spawning inside objects?

**URL:** <https://forums.unrealengine.com/t/how-do-i-correctly-spawn-npcs-on-a-nav-mesh-without-spawning-inside-objects/269588>\
**Category:** AI\
**Tags:** unreal-engine, UE4-26, question\
**Created:** [January 1, 2022, 8:44pm UTC](https://forums.unrealengine.com/t/how-do-i-correctly-spawn-npcs-on-a-nav-mesh-without-spawning-inside-objects/269588 "2022-01-01T20:44:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Napo-Ninja](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Napo-Ninja](https://forums.unrealengine.com/u/Napo-Ninja)\
**Post date:** [January 1, 2022, 8:44pm UTC](https://forums.unrealengine.com/t/how-do-i-correctly-spawn-npcs-on-a-nav-mesh-without-spawning-inside-objects/269588/1 "2022-01-01T20:44:25Z")

</div>

[The issue im having is that I want to spawn NPCS correctly in my map. Right now NPCs spawn anywhere there is nav mesh. The problem is that there are many large rocks in the game, and if i disable navmesh for these rocks, the NPCs dont spawn on top of them (yay) but they spawn inside them and get stuck (boo). I’m wondering if there is any smart solution to procedurally spawning NPCs without them accidentally spawning inside rocks. The only solution I can think here is to manually go through the whole level and add navmesh modifier volumes inside each of those rocks to tell the navmesh to not spawn bots inside of those rocks, but this seems like a nightmare. Thank you!

---

<div class="post-metadata">

**Author:** ![something45](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@something45](https://forums.unrealengine.com/u/something45)\
**Post date:** [January 1, 2022, 10:36pm UTC](https://forums.unrealengine.com/t/how-do-i-correctly-spawn-npcs-on-a-nav-mesh-without-spawning-inside-objects/269588/2 "2022-01-01T22:36:04Z")

</div>

Does this help:

> [@Find closest safe place to put an actor with physics enabled](https://forums.unrealengine.com/t/find-closest-safe-place-to-put-an-actor-with-physics-enabled/269583/2):
>
> Maybe you could build on what’s been discussed in this thread. [https://forums.unrealengine.com/t/how-to-play-death-animation-whenever-the-enemies-health-is-0-in-blueprints-or-c-and-spawn-again-with-the-ai-controller/267910/41?u=something45](https://forums.unrealengine.com/t/how-to-play-death-animation-whenever-the-enemies-health-is-0-in-blueprints-or-c-and-spawn-again-with-the-ai-controller/267910/41)

---

<div class="post-metadata">

**Author:** ![Napo-Ninja](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Napo-Ninja](https://forums.unrealengine.com/u/Napo-Ninja)\
**Post date:** [January 10, 2022, 9:12pm UTC](https://forums.unrealengine.com/t/how-do-i-correctly-spawn-npcs-on-a-nav-mesh-without-spawning-inside-objects/269588/3 "2022-01-10T21:12:53Z")

</div>

this thread did help a bit. The solution we ended up using was putting a whole bunch of nav mesh modifiers all around the map to break up the nav mesh

---

<div class="post-metadata">

**Author:** ![JikaiNoTsubasa](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jikainotsubasa/32/590954_2.png) [@JikaiNoTsubasa](https://forums.unrealengine.com/u/JikaiNoTsubasa)\
**Post date:** [September 8, 2023, 6:42am UTC](https://forums.unrealengine.com/t/how-do-i-correctly-spawn-npcs-on-a-nav-mesh-without-spawning-inside-objects/269588/4 "2023-09-08T06:42:46Z")

</div>

Hi, how do you make an actor spawn inside the navmesh in the first place?

---

<div class="post-metadata">

**Author:** ![DomusLudus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/domusludus/32/1215140_2.png) [@DomusLudus](https://forums.unrealengine.com/u/DomusLudus)\
**Post date:** [September 8, 2023, 6:59am UTC](https://forums.unrealengine.com/t/how-do-i-correctly-spawn-npcs-on-a-nav-mesh-without-spawning-inside-objects/269588/5 "2023-09-08T06:59:35Z")

</div>

> [@JikaiNoTsubasa](#):
>
> Hi, how do you make an actor spawn inside the navmesh in the first place?

Maybe this help you

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/7/b97080cc870b49866e9e8072ca96b0c028a63e87.jpeg "WTF Is? Get Random Point In Navigable Radius in Unreal Engine 4 ( UE4 )") ](https://www.youtube.com/watch?v=M2uCNqMa4FA)
