Download

Build Navmesh manually during runtime?

Hi there, is there a good way to build navmesh during runtime?

For example, I have a function that generates objects in the level. Once that level is generated, in the same frame I then want to build the navmesh.

Tried ExecuteConsoleCommand “RebuildNavigation” but that did not seem to work.

Have also played around with the Navmesh settings in Project Settings but no joy.

I am avoiding Dynamic on Runtime as that is extremely expensive for what I am trying to do.

I don´t know of any other way then to have it rebuild at runtime. Are you sure it is that taxing?

Yes - the game chugs the moment a new actor is spawned that can affect the navigation

Have you tried setting the runtime generation to Dynamic Modifiers Only. I’m using it in my projects for placing buildings that block AI paths at runtime, and it works out quite fine. Plus it’s less expensive when compared to the full Dynamic option.

You find a good tutorial here: Unreal Open World Navigation System - UE4 Open World Tutorials #45 - YouTube