llVolumeDetect(integer detect)
When
detect = TRUE, this makes the entire
link set the script is attached to
phantom. But, if another
object interpenetrates it, it will get a
collision_start event. When an object stops interpenetrating, a
collision_end event is generated. While the other is interpenetrating,
collision events are NOT generated. The script must be applied to the
root object of the link set to get the
collision events. Collision filters work normally (see
llCollisionFilter).
The object can NOT be set to phantom by any other means, or else
llVolumeDetect will not work.
llVolumeDetect will set phantom automatically.
Example:
A script that uses
llVolumeDetect will say "
Attachments cannot use llVolumeDetect." if the object containing the script is
attached at the time
llVolumeDetect is
called. If
llVolumeDetect is used in an attachment, the
collision events will still be triggered.
When enabled
llVolumeDetect will remain in effect as long as there is a script on the object. It will be automatically removed when the last script is deleted, however the
phantom state will persist.
Note:
As of
SL 1.6.7,
llVolumeDetect should not be used on
physical objects! Doing so will cause the object to fall through the
ground and go off-
world. Presumably, this is because
llVolumeDetect does not use the same mechanism as a regular phantom object and that the
Lindens goofed up. The Lindens have been notified of this issue, but it has not yet been fixed. If you need the object to be physical, you can use
llSetBuoyancy(1.0) to fix the falling problem.
Note:
"
llVolumeDetect does not appear to trigger collision_start events on passive objects, only physical objects, this could be a bug in the new SL version, but I could be mistaken." -Kyle Hayashi
Note:
As of SL
1.6.7,
llDetectedLinkNumber will only ever return
0 when used with
llVolumeDetect, even when used in a multi-prim object. This may be caused by the fact that
llVolumeDetect was added some time after the original
detected functions. There is not yet any word on when this might be fixed.
Note:
land_collision_start,
land_collision_end and
land_collision events aren't generated anymore after setting
llVolumeDetect to
TRUE.
Functions |
Detected |
Collisions |
Phantom