I’m running into an issue where the AI stops just outside of range of being able to swing at the player. After debugging I found these numbers:
destination "(150.4, 0.0, 333.3)" UnityEngine.Vector3
Inside OnTargetReached() from MovementUpdateInternal
simulatedPosition "(149.7, 0.0, 333.3)" UnityEngine.Vector3
tr.position "(149.7, 0.0, 333.3)" UnityEngine.Vector3 updatePosition true System.Boolean
path Count=2 System.Collections.Generic.List`1[[UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]
 "(148.4, 0.0, 333.3)" UnityEngine.Vector3
 "(149.9, 0.0, 333.3)" UnityEngine.Vector3
If it isn’t clear from the numbers, the end of the path is about .6 meters from the requested destination, well outside the error margin returned by endReachDistance
You are returning OnTargetReached() based on the end of the path, which is an internal implementation feature the game shouldn’t have to care about
“float distanceToEnd = dir.magnitude + Mathf.Max(0, interpolator.remainingDistance);”
In Seeker I am using NodeConnection for start and end point snapping. I didn’t have this issue before when I used Original for the end point I think but that ends up walking through impassible areas.
In AIPath for the setting “WhenCloseToDestination” I have “Continue to Exact Destination”
Semi-related, another problem with OnTargetReached() is it is called back over and over even when the AI is not moving, once per path update. I have worked around it by checking the last value vs. the current though and not calling the callback again if nothing changed.