Procedural Generation - Navigation Mesh on Runtime

Hey,

I uploaded a video to best detail the problems I’m having. As you can see the code in my video works in either Event Graph or Construction Script.

This allows me to use it as a tool and then when I’m finished set it up as a mesh to generate semi-randomly.
(If you can think of a improvements to this design, please share)

However, when the code is running at Runtime, you can see the initial mesh’s (Before Play) have been set with navigation, then at runtime you can see the navigation slightly extends to cover the next few “Instanced Static Meshes” but then stops, it also doesn’t allow the AI men to run around.

As far as I can tell, this is all I need to do, to get runtime navmesh working.

Have I done something wrong?

Thanks,

Hey there,

I’m not a Navmesh/AI guy, but MieszkoZ posted a work around to force the NavMesh to rebuild:

and in the mean time you can call Execute Console Command function with parameter RebuildNavigation. It’s basically a cheat, but will give you what you need for the time being :slight_smile:

Source: How would I force a navmesh rebuild in Blueprint? - Blueprint - Unreal Engine Forums

Hope that helps you (:

Cheers!

Unfortunately that didn’t help, all it did was flash Red areas Green, but the same small extent of NavMesh is built, which shows it begins to recognize the level but then decides not to a short while after.

Thanks for the link and the comment though :slight_smile:

Inside your DefaultEngine.ini which is located in …/ProjectDirectory/Config/DefaultEngine.ini
place this

[/Script/Engine.RecastNavMesh]
 bRebuildAtRuntime=true