NavMeshAgent stopping well before first destination & won't proceed to next destination

Hello lovely experts!

I have created an array of destination points for my Agent to follow along a patrol path. These 5 points have been set with empty gameobjects, placed relatively close to the ground, and assigned in the inspector. My agent proceeds towards the direction of the first point correctly, but whereas the intended behavior is that he will come very close to it and then calculate / follow to the next point, the Agent instead stops a good distance before reaching the first point. I’d say it stops distance of 10 before point 1, and it is supposed to reach distance 0.5 from point 1 and then calculate point 2 and move there.

I got this code exactly from the unity documentation but unfortunately since I am new I don’t see where this problem is being caused. Your help is very much appreciated!

public class Patrol : MonoBehaviour
{
public Transform[ ] points;
private int destPoint = 0;
private NavMeshAgent agent;

[SerializeField]
private Animator animator;

void Start()
{
agent = GetComponent();
agent.autoBraking = false;
GotoNextPoint();
}

void GotoNextPoint()
{
if (points.Length == 0)
return;

agent.destination = points[destPoint].position;
// move agent to currently selected destination

destPoint = (destPoint + 1) % points.Length;
// choose next point in array as destination, cycle to start if necessary
}

void Update()
{
float currentSpeed = agent.velocity.magnitude;
animator.SetFloat(“Speed”, currentSpeed);
// manages my walk animation

if (!agent.pathPending && agent.remainingDistance < 0.5f)
GotoNextPoint();
// choose next destination as agent approaches current one
}
}

Solved! Stopping distance in the interface was the issue