1681-engine / index / applySteering
Function: applySteering() ​
ts
function applySteering(
agent,
force,
maxSpeed,
dt
): void;Defined in: src/nav/steering.ts:169
One step of steering applied to a body: velocity changed by force × dt, capped at maxSpeed, position moved. For bodies with no physics of their own (birds, a crowd of extras); a physics body takes the force instead.
Parameters ​
| Parameter | Type |
|---|---|
agent | SteerAgent |
force | SteerVec |
maxSpeed | number |
dt | number |
Returns ​
void