I’m using my own “AI” and schedule the agent tasks based on return from path.CompleteState. However, agent path never returns PathCompleteState.Partial, even for paths that are partial (like in included screenshot, target is the green plant thing).
Is it again due to seeker start/end modifier being set to ClosestOnNodeSurface, and therefore technically “successfully completing” the path? If yes, how can i avoid it, can path return PathCompleteState.Partial while end modifier is set on ClosestOnNodeSurface? Can i somehow get path state before the end modifier is applied?
Or is the only way to compare/check distance of OriginalEndPoint and actual path end point on PathCompleteState.Complete?
EDIT: Ah, i see, it’s not implemented yet. How would You check if the path is complete? Does approach below looks reasonable, or would You know a way to do it better?
if(pooledPath.CompleteState == Pathfinding.PathCompleteState.Complete &&
(pooledPath.vectorPath[pooledPath.vectorPath.count - 1] - pooledPath.originalEndPoint).sqrMagnitude > NodeSize * NodeSize)
return true; // Path is calculated and complete
else
return false; // Path is either not calculated or partial