NavMeshGraph obstacles on spherical worlds

Hi there,
I made a spherical world, and i implemented NavMeshGraph Pathfinding on it. It works pretty well so far but how I can add static obstacles on the planet so my enemies would avoid them.

http://postimg.org/image/j2sti0pap/

I got this big cube on the map and i want it to act like an obstacle. I’m using custom AI behaviour from documentation because RichAI wont work on spherical worlds

Thanks!

Hey dude, that looks great!

Try using NavmeshCut. For now, you’ll need to use a recast graph. Since you probably used a custom mesh, this is going to be a big problem for you!

Yes, i used custom mesh because Recast Graph won’t let me to use it on spherical worlds. I can set Max Slope only to 90 deegres (Just like in Unity Navigation system), but I want to move my enemies with every angle around the sphere. Since I wrote the code to move bodies around, only one thing left is to make a pathfinding system. I searched a lot of forums and can’t find any good solution to this. I was hoping you guys can help me figure out how to do this with your system.

Do you know how can I use recast graphs on sphere?

Hi

You can use graph updating to disable and enable specific triangles (see http://arongranberg.com/astar/docs/graph-updates.php), it will not be that accurate but at least it will be something. I am afraid navmesh cuts or recast graphs will not work on spherical worlds, the algorithms they use are inherently 2D (or 2.5D).