integer llEdgeOfWorld(vector pos, vector dir)
Returns TRUE if the line along the direction
dir from the
position pos hits the edge of the
world in the current
simulator. Returns
FALSE if that line crosses into another simulator.
Basic Example:
// returns TRUE if you're in a sim with no neighbor to the north, otherwise FALSE.
llEdgeOfWorld(llGetPos(), <0, 1, 0>)
Useful Example:
You're probably more interested in knowing if, while travelling from
here to
there, you would fall off the world. This function will tell you:
integer wouldGoOffWorld(vector here, vector there)
{
if (there.x < 0 || there.x > 256 || there.y < 0 || there.y > 256)
{
return llEdgeOfWorld(here, there - here);
}
else
{
return FALSE;
}
}
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
Functions |
Simulator