Nav Mesh Agent pauses each time I update its destination?

Hello,

I’m having an issue in my game where my Nav Mesh Agent pauses every time I update its position. Here is my code for how my Nav Mesh Agent updates the target it’s pursuing:

public void ChasePlayer()
{
    // This interval timer ensures that the target is only updated every 0.5 seconds
    if (intervalTimer == 0f)
    {
        agent.navMeshAgent.destination = agent.playerTransform.position;
    }

    intervalTimer += Time.deltaTime;
    if (intervalTimer >= agent.config.destUpdateInterval)
    {
        intervalTimer = 0f;
    }
}

This works fine when my player is on the ground with the enemy Nav Mesh Agent, and the enemy fluidly chases after the player. However, when I am high up in an unreachable spot, the Nav Mesh Agent pauses every 0.5 seconds when it tries to update its destination.

This picture below shows what my scene and its Nav Mesh look likes. Note that my player is on a rooftop, and the enemy is on the ground:

And here is a link to a GIF that shows what happens when my player shoots the enemy and activates its chase behavior; it pauses every 0.5 seconds, and so it keeps stuttering:

I’ve tested in some other locations, and I’ve found that when I add in a ramp and re-bake the mesh (i.e. making it so that there is a path to reach the player), then the Nav Mesh Agent moves fluidly again.

Do I just have too complex of a mesh, and is the Nav Mesh Agent pausing because of how long it takes for it to calculate where the target it? Any tips on how to handle this? Thank you!

Two things I notice if you want to have something that occurs at a fixed rate i would recomend coroutines, they work like this:

void Start()
        {
            StartCorroutine(Chase());
        }

        NavMeshAgent enemyAgent;
        bool playerVisible;
        float timeToWait;
        IEnumerator Chase()
        {
            while(playerVisible)
            {
                bool playerReachable = enemyAgent.SetDestination(agent.playerTransform.position);

                if(playerReachable) 
                {
                    //I will already go towards the player but you can add extra things to do here
                }
                else
                {
                    // do wathever you think its best when player is not reachable 
                }
                yield return new WaitForSeconds(timeToWait);
            }
        }