Don't click here unless you want to be banned.

LSL Wiki : llVolumeDetect

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawling22.us.archive.org
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:
llVolumeDetect(TRUE); // turns llVolumeDetect on.

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
Comments [Hide comments/form]
As of 1.5.5, llVolumeDetect only seems to detect avatars. Collisions with the land or other objects are not detected. This is the case whether the volumedetect object is physical or not. Bug reported 06/10/04

llVolumeDetect can be used with physical objects if you use llSetBouyancy(1.0) to make it float.
-- CatFart (2004-10-06 07:18:44)
I can confirm it does detect objects. Which is strange because I ran a load of tests on different objects and I sure it didnt work. Oh well, at least I can start using llVolumeDetect now :)
-- CatFart (2004-10-22 13:28:15)
1.7 - 1.7.2 A physical object with llVolumeDetect no longer triggers collision_start with non physical objects it seems.
-- LesWhite (2005-11-10 09:00:59)
As of 1.9, llVolumeDetect-enabled objects do not raise the collision_end event in the case of an inter-sim teleport.
-- SchizzySapeur (2006-05-09 19:11:47)
The limitation imposed on llDetectedLinkNumber is *killing me* ...
-- DirtyMcLean (2006-08-03 22:39:24)
I note that certain objects need the llSetBuoyancy() set to 1.5 or so. I've been playing with a shield object, and if the buoyancy isn't high enough, it'll drop through regardless. I'm not sure why yet but I'm suspecting SL physics here.
-- SimonRaven (2007-01-03 23:03:37)
It certainly is a feature. I've seen many scripters using it as a feature and not a bug. I hope they don't "fix" it.
-- Bobbyb30Zohari (2007-01-14 13:50:06)
1997?!?! where is it?????????????????????????????????????????????????????????????????????????????????????????????????????????????????+)_(((&)&_(U_(_UM:J:IJO:OIJL:IJOLJ:OJ:LJ:LJ:L$W#%@#$%^#$%^@#$%^!@#$%^!@#$%^!@^~!@#$%^~!@#$%^~!@#$%^!@#$%^~!@#$%^~!@#$%^!@#$
-- 24-205-128-83.dhcp.mtpk.ca.charter.com (2007-03-22 14:37:54)
1997?!?! where is it?????????????????????????????????????????????????????????????????????????????????????????????????????????????????+)_(((&)&_(U_(_UM:J:IJO:OIJL:IJOLJ:OJ:LJ:LJ:L$W#%@#$%^#$%^@#$%^!@#$%^!@#$%^!@^~!@#$%^~!@#$%^~!@#$%^!@#$%^~!@#$%^~!@#$%^!@#$
-- 24-205-128-83.dhcp.mtpk.ca.charter.com (2007-03-22 14:38:05)
Attach a comment to this page: