This is from a thread in the AI forum, wanted to post here for visibility:
I am currently attempting to upgrade from AstarPathfinding project to 5.6 navigation. Can’t seem to figure out how to query the navmesh without blocking or using a managed NavmeshAgent.
This surprises me considering how awesome and flexible the Navmesh generation process is that the consumption of the Navmesh is confined to one non asynchronous method (Navmesh.CalculatePath) or a fully automated closed source agent.
My use case is our AI is networked, and we query the Navmesh on the server to determine the path of the NPC for the next few seconds, then serialize only the list of corners across the network and traverse the path on both the client and server in a deterministic way perfectly in sync (Using an asset store plugin for the Navmesh query). This sends 1-2 transforms per second across the network vs position and rotation updates at 10hz for streamed positions.
Doing a blocking calculate serverside isn’t an option (my simple tests were returning upto 3ms sometimes)
Seems like my options are:
A) Creating a NavmeshAgent and setting its speed to 0 and hope the local avoidance, transform updates, and all the other features I don’t want aren’t causing too much overhead, further testing shows the agent always tries to own the transform position, only overridable in LateUpdate which may break navmesh ownership stuff.
B) Try to do a setpath on a client side agent and let the server side agent replace our existing path traversal code
Any insight would be helpful