Agent stops before reaching first destination in series, can't proceed to next stop

Hello lovely experts!

I have created an array of 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. Let’s say it stops distance of 10 before point 1, and it is supposed to reach distance 0.5 and then calculate the next point.

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! good old stopping distance was the culprit…

And this solved my problem, LOL. Thanks