Unity Pathfinding

Hi,
Im using the unity pro path finding, I know how to make agent go to a destiantion (GetComponent().destination = new Vector3 ()etc… but what i cant seem to get right is how to make him do an action when he reaches that destination or how to check when hes reached destination. Any help apreciated thanks…

You could just check his distance from his destination and once it is under some threshold do your action. Probably even better to check the nav mesh agent velocity square magnitude and see if that is under some threshold.

Actually, looks like “Unity - Scripting API: AI.NavMeshAgent.remainingDistance” is the way to go.