LlVolumeDetect
From Second Life Wiki
| LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Tutorials |
Contents |
Summary
Function: llVolumeDetect( integer detect );| 248 | Function ID |
| 0.0 | Delay |
| 10.0 | Energy |
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.
| • integer | detect | – | TRUE enables, FALSE disables |
Specification
| VolumeDetect | Phantom | |
|---|---|---|
| Events Supported | collision_start collision collision_end | land_collision_start land_collision land_collision_end |
Differences
There are a couple differences in how Phantom and VolumeDetect handle collisions; specifically which events are supported and how they handle the ground.
Caveats
- llDetectedLinkNumber will return 0 in collision events of VolumeDetect objects (SVC-2996).
- It cannot be enabled on attachments[1].
- It can only be applied to the root prim (which will make the entire object VolumeDetect).
- It only detects physical objects and avatars.
- When moving via llSetPos() by a loop of stages, collision events will not trigger.
- Attachments will not register collision events when the avatar collides with a VolumeDetect object.
Examples
default { state_entry() { llVolumeDetect(TRUE); // Starts llVolumeDetect } collision_start(integer total_number) { llSay(0, "Detected!"); // Tells you when something penetrates the prim } }
Deep Notes
Issues
~ Search JIRA for related Issues| | | SVC-2996 | [c] | llDetectedLinkNumber returns 0 with llVolumeDetect(TRUE) |
Footnotes
- ^ Attachments aren't included in the avatar bounding box, so it's moot
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.

