Skip to content

five-on-it / packages/ai/src/steer-foot / FOOT

Variable: FOOT ​

const FOOT: object

Defined in: packages/ai/src/steer-foot.ts:17

The numbers of walking a path.

Type Declaration ​

arrive ​

readonly arrive: 1 = 1

Within this distance of the last waypoint the walk is over (m).

avoidAngle ​

readonly avoidAngle: 0.6 = 0.6

The side rays' angle from the heading (rad).

avoidNear ​

readonly avoidNear: 1.5 = 1.5

A hit nearer than this on the middle ray makes the character steer to a side (m).

avoidRange ​

readonly avoidRange: 2.5 = 2.5

Reach of the three rays that find cars and people in the way (m).

episodeWindow ​

readonly episodeWindow: 180 = 180

Recoveries this close together escalate: a jump, then a plan around the spot (ticks).

jumpCooldown ​

readonly jumpCooldown: 120 = 120

Ticks between two jumps.

lookahead ​

readonly lookahead: 1.2 = 1.2

Within this distance a waypoint counts as reached and the next one is aimed at (m).

lookaheadRunning ​

readonly lookaheadRunning: 2.5 = 2.5

The same while running (m).

penalty ​

readonly penalty: 4 = 4

How much dearer they are.

penaltyTicks ​

readonly penaltyTicks: 300 = 300

Ticks the cells around a spot that stuck the character stay dear.

replanDrift ​

readonly replanDrift: 4 = 4

A goal that moved this far from the planned one asks for a new plan at once (m).

sidestepTicks ​

readonly sidestepTicks: 30 = 30

Ticks of sidestep per recovery.

stuckSpeed ​

readonly stuckSpeed: 0.5 = 0.5

Slower than this while trying to move is not moving (m/s).

stuckTicks ​

readonly stuckTicks: 20 = 20

Ticks not moving before a recovery starts.