# Several different NavMeshes for the same area?

**URL:** <https://forums.unrealengine.com/t/several-different-navmeshes-for-the-same-area/312241>\
**Category:** AI\
**Tags:** Navigation, unreal-engine, navmesh, question\
**Created:** [March 23, 2015, 12:49pm UTC](https://forums.unrealengine.com/t/several-different-navmeshes-for-the-same-area/312241 "2015-03-23T12:49:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_Egorenkov\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A\_Egorenkov\_1](https://forums.unrealengine.com/u/A_Egorenkov_1)\
**Post date:** [March 23, 2015, 12:49pm UTC](https://forums.unrealengine.com/t/several-different-navmeshes-for-the-same-area/312241/1 "2015-03-23T12:49:50Z")

</div>

Hey Guys,

Here’s the problem I have: imagine you’re working on a GTA-like game, where you’ve got pedestrians walking on sidewalks and cars navigating along roads. This, apparently, requires their two respective AIs to use two different NavMeshes for pathfinding.

Now, if a pedestrian or a car driver is in panic and is trying to escape or chase a target, they apparently need to drop their usual navigation limits and switch to a third NavMesh, which equally includes all terrain suitable for navigation – roads, sidewalks, lawns, gaps between buildings etc. So you’d need a third NavMesh for this purpose.

Now, I can’t seem to find a way to have 3 instances of NavMesh built for different types of navigation (for different sets of collision boxes for example) and stored simultaneously for further use.

Could you please give me any advice on how to pull this off? I’m a bit new to the AI and navigation aspects of UE4.

I’d prefer a blueprint solution, however, I could resort to C++ if there’s no other way.

Thanks in advance,  
Best regards,  
Alex

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1690214](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1690214](https://forums.unrealengine.com/u/anonymous_user_e1690214)\
**Post date:** [March 23, 2015, 6:57pm UTC](https://forums.unrealengine.com/t/several-different-navmeshes-for-the-same-area/312241/2 "2015-03-23T18:57:45Z")

</div>

Cars and pedestrians probably need different navmeshes (because different radii), and that part’s straightforward: Just define a second agent type in the Navigation options, with a different radius.

For panicking pedestrians, though, the easiest thing is probably to give the “only when you’re panicking” areas their own NavArea. Then, you blueprint a NavigationQueryFilter which rejects those areas. Then, when invoking pathfinding (MoveTo etc.), pass that navigation filter if the character is _not_ panicking, and pass no filter if they are.

---

<div class="post-metadata">

**Author:** ![A\_Egorenkov\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A\_Egorenkov\_1](https://forums.unrealengine.com/u/A_Egorenkov_1)\
**Post date:** [March 24, 2015, 6:44am UTC](https://forums.unrealengine.com/t/several-different-navmeshes-for-the-same-area/312241/3 "2015-03-24T06:44:06Z")

</div>

Thanks! This filter seems like what I need, I’ll try using it!
