Can you think of a good way to mimic the behavior of NavAgent.destination?

Okay so, for convoluted reasons, I’m not using NavAgents for my path finding. I want to control Enemy AI with my own scripts. I am however using NavMesh and CalculatePath() for path finding, and then I have my enemy use the corners of the path to move about. Which works great for stationary destinations. But I can’t wrap my head around using CalculatePath() for moving targets. How do you think the NavAgent handles that? It follows moving targets so well, as if its calculating a path every frame. More importantly, how do you think the logic works for just moving the enemy around? Meaning, if they calculate a new path frequently, the corner the Agent is moving towards is going to be moving around. I guess my question here is, can you think of a good way to use CalculatePath() for moving targets?

To use CalculatePath() for moving targets, you could either calculate a new path frequently or use a prediction system to estimate the target’s future position. It’s important to test and tweak the frequency of path calculation, prediction system and the parameters to see what works best for your game