Solution for adding and merging navigation regions?

Hey guys!

So, I’m working on a prototype of global map for my project and here is what I’m trying to achieve:

Here, we have a simple geometry that i need to do pathfinding as player moves around. The thing is that i need to add new regions as player progresses, and i would like to avoid using RecastGraph if it is possible since it will introduce some lag, and i prefer to create navmesh by hand so i can have more control and precision.

My perfect solution would be if i could load a prescanned graphs from files and merge them together when player opens a new region. From searching this forum it turns out that there is no way to do this. Alternatively i would create a prescanned progression of graphs but my region progression is not linear.

Is there a solution for merging graphs or building a path through several graphs, or maybe more appropriate way to deal with my situation?

I’m sure that i can make this work with RecastGraph if necessary, but it would like to ask for your advice first. Thank you!

Hi

Sorry, there is no built in way to do this.
However if you only need two regions loaded at any time, you could create your own script which combined two adjacent regions’ navmeshes and then updates the graphs to use that.

Keep in mind that merging regions like that will likely require the meshes to line up exactly since otherwise there is not really any obvious way to merge them.

If your world is not that large, you could also just keep the navmesh for the whole world loaded at all times and just stream the geometry.