Hi,
It seems that in some cases, the method `IAstarAIMovement.HasArrived()` return `true` while the agent is still very far from its destination.
After some investigation `agent.remainingDistance <= arriveDistance.Value` seems to be incorrect:
- agent.remainingDistance is the remaining distance to the next waypoint chose by A* and not the final destination.
If fixed locally by replacing `agent.remainingDistance <= arriveDistance.Value` by `(agent.destination - agent.position).sqrMagnitude <= arriveDistance.Value * arriveDistance.Value` in the function `IAstarAIMovement.HasArrived()`.
Best regards
It seems that in some cases, the method `IAstarAIMovement.HasArrived()` return `true` while the agent is still very far from its destination.
After some investigation `agent.remainingDistance <= arriveDistance.Value` seems to be incorrect:
- agent.remainingDistance is the remaining distance to the next waypoint chose by A* and not the final destination.
If fixed locally by replacing `agent.remainingDistance <= arriveDistance.Value` by `(agent.destination - agent.position).sqrMagnitude <= arriveDistance.Value * arriveDistance.Value` in the function `IAstarAIMovement.HasArrived()`.
Best regards