# NavMeshAgent is not calculating a new path

I have the following code that gets run when a game object collides with a trigger. When the object is created, it is created within an initial trigger which fires the SetNextWaypoint code below and it works fine.

protected NavMeshPath path;
protected NavMeshAgent agent = null;

void Start () {
path = new NavMeshPath();
agent = GetComponent<NavMeshAgent>();
}

public void SetNextWaypoint(Vector3 location){
agent.ResetPath();
path.ClearCorners();
agent.CalculatePath(nextWayPoint, path);
agent.SetPath(path);
}


Once the agent enters a new waypoint (it may not have reached its destination yet) SetNextWaypoint is called again and when it does the agent just stops where it is, and doesn't move anywhere.

I figured it out! The issues was that my next waypoint was positioned too far above the NavMesh. But for some reason path.status was still returning PathComplete.