I’m trying to spawn several nav mesh bounds volumes at runtime. My game spawns the entire environment on play which consists of a random amount of rooms (within a range), each having some enemies within.
I glossed over some previous questions on the topic that mentioned placing the nav meshes beforehand then moving them at runtime, but I don’t know how many nav meshes will be needed before the environment is spawned which is random.
Is there a way to spawn nav mesh bounds volumes in blueprints? All I found was add nav link, modifier, and invoker components nodes.
I think the word that you are looking for is dynamic nav mesh. Very useful for a procedurally generated world as well as a huge level. Do some research on this, and you will find it helpful.
Hey there @Kyparon! Navmesh bounds volumes aren’t quite set up to be generated at runtime, though I believe with level instancing it should be possible. Then here’s a resource for setting up the dynamic nav mesh itself.
Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.
Yeah, dynamic nav mesh is what you’re looking for, don’t forget to set the runtime generation to dynamic in settings. I have a game on steam that spawns the whole world procedurally/randomly at runtime too
I need to do what the OP stated also and dynamic nav meshes seem to do the opposite of what I need.
I am creating a game where the goal is to see how long a player can survive and how many rooms the player can clear. Essentially it is an infinite runner but with enemies in each room. I thus need to update the position of the NavMesh Bounds volume each time I remove the old room and add a new one OR I need to add a Nav Mesh Bounds Volume to my room blueprints.
The tutorials I find (and the video linked to included in this thread) say “Build a NavMesh Volume that is 10000 units long on the y and infinite long on the x then do all manner of trickery to avoid the AI from reaching certain spaces”. Nothing says how to create a 10000x10000 NavMesh Volume
From what I’ve read it seems this is not something Unreal can do. Instead I have to make the volume massive and then end my infinite run game if the player reaches n rooms. Do I have that right?
Do you have 1 tyoe of room or multiple?
What I would do is add the nav mesh in the room, load it in game, and instead of remove the room and add it back, just recycle the room BP.
I had multiple rooms. The plan was to have 20 in total. The issue I have is that I can’t “add the nav mesh in the room”. How do I do that?
I don’t ever delete the rooms
What I did was spawn all rooms during Begin Play then I placed 3 after one another starting from 0,0,0 and placed the character at 0,0,0 also. Each room has a trigger so I know when the player is nice and deep into that room. Once it triggers I move the first room back into the pool and then select another room at random and reposition it at the end of the remaining two. This way, even with only 3 rooms, I can have an infinite runner
The problem is that I can’t find a way to add a NavMesh to the room blueprint. Am I missing something obvious?