Skip to content

five-on-it / packages/ai/src/perception / seesVehicle

Function: seesVehicle() ​

seesVehicle(sim, npc, car, p): boolean

Defined in: packages/ai/src/perception.ts:105

Whether npc has a vehicle in sight, as lineOfSight has a person: within its range and cone, nothing but the vehicle (or someone in it) between its eyes and the vehicle's centre, no smoke. The police's eyes on a car with Heat of its own (police-heat.ts).

Parameters ​

sim ​

SimWorld

npc ​

number

car ​

number

p ​

BehaviourProfile

Returns ​

boolean