Skip to content

five-on-it / packages/sim/src/carjack / carInReach

Function: carInReach() ​

carInReach(sim, eid, vehicle): boolean

Defined in: packages/sim/src/carjack.ts:208

Whether a car stands within the key's reach of a character, whole: its half length plus CHARACTER.enterRange from its centre. A boat is within reach of one standing (or swimming) beside its hull, its deck not far over nor under the character's feet (BOAT_BOARDING): nobody gets in from a bridge over it.

Parameters ​

sim ​

SimWorld

eid ​

number

vehicle ​

number

Returns ​

boolean