Function RandomPath.RefreshPathEndpoints
void RefreshPathEndpoints (
start | ||
end |
Refreshes the start point of the path.
Useful if the agent has moved significantly since the path was requested.
If the path has not yet been processed by the pathfinding system, the start point will be updated immediately. If the path is being calculated or has been calculated, this function will do nothing.
A common way is to call this function once per frame until the path has been calculated, with the most up-to-date position of the agent.
Note
For a RandomPath, this method only updates the start point, since the end point is determined by the pathfinding result.