llVolumeDetect
llVolumeDetect();- Energy
- 10
If detect is TRUE, VolumeDetect is enabled, physical object and avatars can pass through the object.
This works much like Phantom, but unlike Phantom, VolumeDetect objects trigger collision_start and collision_end events when interpenetrating. Collision events will trigger in any script in the object.
llVolumeDetect(0);Specification
Section titled “Specification”Events queued depending on type
| VolumeDetect | Phantom | |
|---|---|---|
| Events Supported | collision_startcollision_end | land_collision_startland_collisionland_collision_end |
Differences
Section titled “Differences”There are a couple differences in how Phantom and VolumeDetect handle collisions; specifically which events are supported and how they handle the ground.
VolumeDetect
Section titled “VolumeDetect”- When physical they fall through the ground with the risk of going off-world.
collisionevents are not triggered
Phantom
Section titled “Phantom”- When physical they collide with the ground but will not pass through (normal physical object behavior), land collision events are queued.
Caveats
Section titled “Caveats”- It can only be applied to the root prim (which will make the entire object VolumeDetect).
- If the volume detecting object is not physical, it can only detect physical objects and avatars. If the object is physical, it can detect its collisions with static and keyframed motion objects as well.
Attachments
Section titled “Attachments”Note: Attachments are not included in the avatar’s bounding box. Collision events received by attachments are collisions the avatar is having with the world, not collisions the attachment is having. Nothing actually can collide with an attachment1.
- It is meaningless to enabled on attachments. Attachments cannot collide with anything.
- Attachments do not receive collision events for avatar collisions with VolumeDetect objects.
- Attachments do receive collision events for avatar collisions with non-VolumeDetect, non-phantom objects.
Examples
Section titled “Examples”Example 1
default{ state_entry() { llVolumeDetect(TRUE); // Starts llVolumeDetect } collision_start(integer total_number) { llSay(0, "Detected!"); // Tells you when something penetrates the prim }}Known issues
Section titled “Known issues”From the issue templates included by the wiki article:
- SVC-2490 (bug): llCollisionFilter completely ignored after call to user-defined function and then a call to llVolumeDetect(TRUE)
- SVC-8141 (bug): Volume Detect objects are not always allowing objects to pass through.
- SVC-2996 (fs): llDetectedLinkNumber returns 0 with llVolumeDetect(TRUE)
See also
Section titled “See also”Functions
Section titled “Functions”Events
Section titled “Events”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.
Footnotes
Section titled “Footnotes”-
Even if attachments were included in an avatars bounding box, you would not like the outcome, the avatars bounding box is not deformed by animations. ↩