Support Forum

Travel Time of one path

Hello
how can get travelTime of one path ?
i use from AIPath for moving

Hi

A good estimate is to take the length of the path and divide it with the AI’s max speed.

E.g.

void OnPathComplete(Path p) {
     Debug.Log((p as ABPath).GetTotalLength() / ai.maxSpeed);
}
1 Like