My NavMeshAgents are following my player around the scene which works fine, the issue is when I enter a zone they cannot access, they stop moving until i leave to an area they can reach me from. The weird issue is, even though they stop and cannot reach me, their pathStatus shows as pathCompleted rather than PathInvalid. Is there a reason for this?
Preferably, I would like them to go to the last position of the player before entering the inaccessible area. Is there a way I can achieve this?
if (agent.enabled == true)
{
agent.SetDestination(currentTarget.transform.position);
//I could say
//If PathInvalid
//Go to last known point
}
As in my comment, if their path status showed as Invalid, I could use that as a starting point, but it never shows invalid.