Jump to content

Log avatar moving through a phantom prim


DrNixion
 Share

You are about to reply to a thread that has been inactive for 2522 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Sure.  If you want to know whether an avatar has collided with the prim, include a collision_start event in your script and grab the avatar's UUID with llDetectedKey.  If the prim is phantom, be sure to set llVolumeDetect(TRUE) in the state_entry event.  If you want to know whether an avatar has passed nearby, use llSensorRepeat with a reasonably short repeat time and then watch for llDetectedKey in the sensor event.  There are many other ways you could do this, but that's perhaps the simplest.

Link to comment
Share on other sites

I would use collision_end(integer total_number) to detect a pass-through which should work accurate within normal move conditions ( walking ) of an avatar, something like this:

    // Entering
    collision_start(integer num_detected)   // check for an avatar colliding with the prim.
    {
        vector pos = llDetectedPos(0);
        llOwnerSay( llDetectedName(0) + "has entered at: " + (string) pos );
    }
    
    // Leaving
    collision_end(integer total_number)
    {
        vector pos = llDetectedPos(0);
        llOwnerSay( llDetectedName(0) + "has left at : " + (string)pos );
    }

Now to detect within a given vicinity record the position of the object and compare it to llDetectedPos()

Edited by Rachel1206
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2522 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...