Pathfinding on spherical world

I’m evaluating usage of the Pathfinding Project within a game that features spherical worlds. It’s obvious that a NavmeshGraph is my best bet (and that a GridGraph simply wouldn’t work), but I wanted to check that there are no internal XZ assumptions inherent in using a NavmeshGraph that will sink me?

I’m hoping to use a number of separate graphs for localized usage in certain parts of the world along with a simple ‘full coverage’ graph used by a side-kick character that needs to follow the player anywhere. Is there a way to associate a name or ID with a graph so that as new graphs are added I have a safe way to determine the mask value used by a client?

Thanks! …And I’m really liking everything I’ve so far seen of the A*PP and docs :slight_smile:

Hi

Unfortunately, navmesh graphs do have some XZ assumptions, many of them are the kind which just might reduce performance slightly (nearest node lookup is optimized for XZ worlds). Pathfinding on them should work fine though.
The tricky part is the funnel modifier (which is basically required to make it look good). It assumes the world is XZ. It is theoretically possible to unwind the geometry to make it work, but I haven’t done that so far as 99(.9)% of all games don’t use it.
Actually, if the world is not very large, I suggest that you follow the tutorial for making a custom graph in the docs ( see Extending the System), it shows how to make a circular graph. It will have lower performance, but it will work.

Thanks for the fast response. I appreciate that what I’m doing is relatively unusual so what you’re saying is totally reasonable. Good to know that basic pathfinding should work at least.

I shall look into the custom graph approach…