Macaw OS C reference

Function leveltrace

#include <macawlevel.h>
double leveltrace(
    int level,
    double x0,
    double y0,
    double z0,
    double x1,
    double y1,
    double z1
);

Follows a line from one point to another and tells you how far it gets before it hits something. Use it to see whether one place can see another.

Parameters

levelint
The level to look through.
x0double
X of where the line starts.
y0double
Y of where the line starts.
z0double
Z of where the line starts.
x1double
X of where the line ends.
y1double
Y of where the line ends.
z1double
Z of where the line ends.

Returns double

How far along it got, from 0 to 1, where 1 means it hit nothing.

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