How to spawn a NavModifierVolume in C++

I can’t seem to figure out how to spawn a NavModifierVolume into the world in C++ and set its box brush shape size and area class? Can anyone please show me example code of how to do this?

There’s no way to dynamically create fully functional Volumes in UE4, sorry. But you don’t have to. Just create an actor that would implement INavRelevantInterface, similarly to how NavModifier does.

Cheers,

–mieszko

Thanks Mieszko for the sad news.

Perhaps your AI wisdom can suggest an alternative idea to my issue. My game world is composed of a 100x100 grid of tiles. So I assume spawning 10,000 actors (implementing INavRelevantInterface) would be a bad idea?

I need a way to dynamically (changes throughout the game) set the movement cost of tiles for the AI so they avoid walking on certain tiles unless they have to (i.e. no other path). I considered implementing A*, but I don’t want the AI to walk rigidly from tile to tile. I still want them to walk freely around the grid like they do with the navmesh.

Hey @MieszkoZ , if you wouldn’t mind, I have a related question here: https://answers.unrealengine.com/questions/863645/view.html