five-on-it / packages/world/src/geometry / isOpenGround
Function: isOpenGround()
isOpenGround(
level,x,z,clearance?,surface?):boolean
Defined in: packages/world/src/geometry.ts:369
Whether a point on the ground is clear of everything built (with clearance metres to spare), so a person can be put there without starting inside something. The ground is what surfaceHeight says; anything whose triangles come within the clearance, rise more than a step above that ground where they come nearest and start below head height over it is in the way: a wall, a terrace's cliff seen from below, the side and the back wall of a ramp. A bridge deck high over the street leaves the street open, a kerb is nothing, and the slope one stands on is ground, not a wall. surface is the ground the point stands on, by default what surfaceHeight says; a road on a deck passes the deck's top instead. Pieces nobody collides with do not count.
Parameters
level
x
number
z
number
clearance?
number = 1
surface?
number = ...
Returns
boolean