Leave and Enter NavMesh

We have a large world and in general the NPCs can move around the terrain. We then want NavMesh volumes around the buildings so the nav in buildings is smarter.

How does one let a NPCs Actor leave and enter NavMesh volumes?

Use AIController.MoveToActor to AIController.MoveToLocation with Use Pathfinding pin set to false.

Cheers,

–mieszko

That is a partial answer because what I want to do is use NavMesh around buildings (within say 10 meters) but not in open terrain.

So far the only idea i have is to put a trigger around buildings and use path finding if inside the trigger.

I just hoped there would be an automatic way.

That is a partial answer because what I want to do is use NavMesh around buildings (within say 10 meters) but not in open terrain.

So far the only idea i have is to put a trigger around buildings and use path finding if inside the trigger.

I just hoped there would be an automatic way.

There’s no automated solution for this. However, 4.8 has a new navigation feature that allows you to define “Navigation Invokers” (both static and dynamic) that make navmesh generate around them in a defined radius. This is a really interesting feature if you can afford runtime navmesh generation.