Moving Agents on NavMesh in Unity

Jared Amlin
Geek Culture

--

Now that the NavMesh has been setup from the previous article, we can start moving our Agent around the scene.

I am going to use this clown model from the Filebase asset library, because…who doesn’t like clowns?

This clown model has a component of type Nav Mesh Agent added to it. More on what these settings do can be found in my previous article here.

Basically, the Ai needs the Nav Mesh Agent component in order to know about the Nav Mesh to move around on it.

Before we get too involved in scripting the Agent, you will need to use the UnityEngine.AI namespace.

using UnityEngine.AI;

Move to a Random Waypoint

--

--

Jared Amlin
Geek Culture

I am an artist and musician, that is currently diving headfirst into game development with C# and Unity3D.