Skip to content

five-on-it / packages/ai/src/traffic-route / locate

Function: locate() ​

locate(route, x, z): RoutePosition

Defined in: packages/ai/src/traffic-route.ts:269

The car's position on its route: the segment it is on is remembered and never given up backwards, the next one taken once the car is past the current one's end.

Parameters ​

route ​

TrafficRoute

x ​

number

z ​

number

Returns ​

RoutePosition