I am making a zombie game and i want the zombies to use Unity’s built-in pathfinding system, but i want to control the zombies myself (with a NON-kinematic rigidbody and using AddForce to move them) and have the pathfinding system just tell me where the zombie should go.
I have seen the manual, tutorials and script reference, and i was impressed to find that they all seem to take for granted that the NavMeshAgent should control the character, as i can think of various reasons why someone would not want that (such as in my case), and it seems to me that there is obviously no technical reason why this should be the case. I don’t mind losing some non-core features of the system, such as off-mesh links, moving obstacle avoidance, etc.
The only thing that i could think of was to set NavMeshAgent.updatePosition to false so that it can’t control the zombie’s Transform, then constantly set NavMeshAgent.nextPosition to match the transform’s position so that the NavMeshAgent doesn’t simply continue moving in its internal simulation, then reading NavMeshAgent.path to find out the direction in which to move the zombie. But i don’t know if this will work or if it will cause bugs or intense performance costs (wouldn’t constantly setting NavMeshAgent.nextPosition make it have to constantly recalculate a path?).
If there is no way to achieve what i want using Unity’s built-in system, then i would appreciate a recommendation on a free third-party pathfinding system that can do what i want (if there are any).
If it matters, my game is 2d top-down (not isometric, but real top-down).