Skip to content

five-on-it / packages/ai/src/steer-vehicle / pursuitSteer

Function: pursuitSteer() ​

pursuitSteer(vc, speed, alpha, distance): object

Defined in: packages/ai/src/steer-vehicle.ts:372

Pure pursuit: the steering input that takes a car of class vc at speed along the arc to a point alpha rad off its heading and distance metres away (the class's lock shrinking with speed, as it does for a player), and the arc's curvature (1/m).

Parameters ​

vc ​

VehicleClass

speed ​

number

alpha ​

number

distance ​

number

Returns ​

object

curvature ​

curvature: number

steer ​

steer: number