Macaw OS C reference

Function levelboxinside

#include <macawlevel.h>
int levelboxinside(
    int level,
    double x,
    double y,
    double z,
    double hx,
    double hy,
    double hz
);

Tells you whether a box is inside a brush, by more than just touching it. Use it to check a player hasn't ended up stuck in a wall.

Parameters

levelint
The level to look in.
xdouble
X of the box's middle.
ydouble
Y of the box's middle.
zdouble
Z of the box's middle.
hxdouble
Half the box's width along x.
hydouble
Half the box's height.
hzdouble
Half the box's depth along z.

Returns int

1 if the box is inside something, or 0 if not.

In Bumping into it, with leveltracebox, leveltrace, levelraycast, levelboxsolid.