Code summary:
Detects avatars whose bounding box intersects with a straight line.
// Forward sector avatar intersect
// Ordinal Malaprop
// 2006-09-22
// Should report the first avatar whose bounding box "sort of"
// intersects the forward vector of the toucher, adjusted for eye level.
// An assumption is made for simplicity that the box is actually a
// cylinder; this won't make any real difference in practice.
default
{
touch_start(integer n)
{
llSensor("", NULL_KEY, AGENT, 96.0, PI_BY_TWO);
}
sensor(integer n)
{
// Adjust position for eye level
vector mypos = llGetPos() + <0.0, 0.0, 0.75>;
// Current forward