LlVolumeDetect

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/de Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

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

Events queued depending on type
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.

VolumeDetect
  • When physical they fall through the ground with the risk of going off-world.
Phantom
  • When physical they collide with the ground but will not pass through (normal physical object behavior), land collision events are queued.

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.

Search JIRA for related Bugs

Examples

default
{
    state_entry()
    {
        llVolumeDetect(TRUE); // Starts llVolumeDetect
    }
    collision_start(integer total_number)
    {
        llSay(0, "Detected!"); // Tells you when something penetrates the prim
    }
}

See Also

Events

•  collision_start
•  collision
•  collision_end

Functions

•  llPassCollisions

Deep Notes

Issues

~ Search JIRA for related Issues
New Feature - A new feature of the product, which has yet to be developed. Open - The issue is open and ready for the assignee to start work on it.    llDetectedLinkNumber returns 0 with llVolumeDetect(TRUE)

Footnotes

  1. ^ 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.
Personal tools
In other languages