I am unsure about the purpose of zones in three-pathfinding - are they simply for storing multiple different regions which do not connect, or is there a way to make a path that goes from one zone to another?
My purpose is to try to load and unload terrain and navmesh tiles for an infinite scrolling world. It would make things much easier if there was a way to put them side by side and allow movement across the border, but I do not know if that is possible.
Zones are for storing regions that don’t connect, or that have non-walkable connectivity, like a closed door or a loading screen. You could always swap the zones out during gameplay though, say to combine two zones after a door opens. I don’t think there’s a specific “right” way to organize your zones, at least that I know of.
1 Like
Thanks for the response, and the great library, Don!
Just FYI, I am using it in Hubs.
By “combine two zones” do you mean unload the navmesh that only went up to the door, and then load another that has that mesh plus the mesh beyond the door already combined?
That resembles the solution I was starting to come up with in my head - for a tiled landscape, it would be a little bit inefficient, but maybe not too bad, to have a grid of nine squares and then load a new set each time you cross out of the center into one of the edge squares. Just wanted to make sure there wasn’t a built in way to do it that was cleaner than that.
Yeah, a little inefficient and won’t scale so well if you have tons of doors, but not a big deal for a simple scene either. There are fancier ways to do this (see the Recast/Detour pathfinding library, with movable obstacles) but three-pathfinding is not that advanced. 