Difference between revisions of "LlVolumeDetect"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 4: Line 4:
|func=llVolumeDetect|p1_type=integer|p1_name=detect
|func=llVolumeDetect|p1_type=integer|p1_name=detect
|func_footnote
|func_footnote
|func_desc=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.
|func_desc=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.
|return_text
|return_text
|spec
|spec
Line 12: Line 13:
*Only detects physical objects and avatars.
*Only detects physical objects and avatars.
*Can only be applied to the root prim.
*Can only be applied to the root prim.
*When moving via [[llSetPos]]() by a loop of stages, collision events will not trigger.
|constants
|constants
|examples=<lsl>default
|examples=<lsl>default

Revision as of 12:06, 3 June 2009

Summary

Function: llVolumeDetect( integer detect );

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

Caveats

  • llDetectedLinkNumber will return 0 in collision_start and collision_end events of VolumeDetect objects (SVC-2996).
  • VolumeDetect objects will fall through the ground, whereas Phantom objects will not.
  • Does not work on attachments.
  • Only detects physical objects and avatars.
  • Can only be applied to the root prim.
  • When moving via llSetPos() by a loop of stages, collision events will not trigger.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>default {

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

See Also

Events

•  collision_start
•  collision
•  collision_end

Functions

•  llPassCollisions

Deep Notes

All Issues

~ Search JIRA for related Issues
   llDetectedLinkNumber returns 0 with llVolumeDetect(TRUE)

Signature

function void llVolumeDetect( integer detect );