Hi,
So I have the code below:
if (seeker.GetCurrentPath()==null)
{
}
Is this the correct way to check if there is no path calculating and the ai is not moving?
Hi,
So I have the code below:
if (seeker.GetCurrentPath()==null)
{
}
Is this the correct way to check if there is no path calculating and the ai is not moving?
Hi
That’s two questions in one.
If you are using one of the built-in movement scripts then use:
GetComponent<IAstarAI>().pathPending
to check if the movement script is calculating a path right now. See IAstarAI - A* Pathfinding Project
You can check if it’s moving or not using the ai.velocity
property.