Navmesh Agents — The Backbone of AI Pathfinding

Jack Leavey
Aug 16, 2022

--

Now that the floor is baked and readable by the AI, it is time to delve into the nuances of AI pathfinding in Unity.

The Monster is now able to use the baked Navmesh to calculate movement.

The first thing the monster needed was a NavMesh Agent component.

The Navmesh Agent is Unity’s built in solution for reading the navigational data generated by baking the surfaces. With this component, the object “knows” where it can and cannot go.

It is worth noting that the NavMesh Agent does not give movement instructions to the object: that must still be done through code. It simply sets the boundaries of where the object is allowed to travel to!

--

--

Jack Leavey
Jack Leavey

Written by Jack Leavey

I am a software engineer with years of experience branching into game development, specifically in Unity. Follow along for guides on creating game mechanics!

No responses yet