Skip to content

five-on-it / packages/sim/src/character / exitPoint

Function: exitPoint() ​

exitPoint(sim, eid, vehicle, door, gap?, ends?): Point | undefined

Defined in: packages/sim/src/character.ts:1329

Where a character can stand beside its car at a door, looked for in turn: at the door (EXIT.gap from the flank, gap for another clearance), then along the same flank a step at a time either way from it, the nearest first, then the same across the car (over the seats), then in front of the car (unless ends is off: a bail-out) and behind it; each on the ground below it and, failing that, half a metre higher (a kerb, a bump). A door at an end (the ambulance's back) is tried there first, then a step at a time across that end, then along both flanks from that end. The first free one (spotFree), undefined when every one is blocked.

Parameters ​

sim ​

SimWorld

eid ​

number

vehicle ​

number

door ​

VehicleDoor

gap? ​

number = EXIT.gap

ends? ​

boolean = true

Returns ​

Point | undefined