five-on-it / packages/sim/src/water / vehicleInWater
Function: vehicleInWater()
vehicleInWater(
sim,vc,x,y,z):boolean
Defined in: packages/sim/src/water.ts:56
Whether a vehicle of class vc whose chassis centre is at (x, y, z) sits in water (not lava): the surface over the bottom of its body (its centre less its half height), so a car wading deep enough to wet its chassis, afloat, flooding or sunk; never one splashing through a sheet shallower than its ground clearance. A fire goes out there and never starts (fire.ts); the client draws no smoke there. A pure function of the pose, the same on the server and on a client.
Parameters
sim
vc
x
number
y
number
z
number
Returns
boolean