Difference between revisions of "LlVolumeDetect"

From Second Life Wiki
Jump to navigation Jump to search
(Undo revision 603973 by Harleen Gretzky (Talk) we cannot copy content from the LSLWiki)
Line 7: Line 7:
in any script in the object.
in any script in the object.
|return_text
|return_text
|spec
|spec=
====Differences====
There are a couple differences in how Phantom and VolumeDetect handle collisions.
 
{{{!}} {{Prettytable}}
{{!}}- {{Hl2}}
{{!}}
! {{LSLGC|Land Collision|Land Collisions}}
! {{LSLGC|Collision Events|Object/Avatar Collisions}}
{{!}}- align="center"
! {{Hl2}} {{!}} Phantom
{{!!}} Supported
{{!!}} Not Supported
{{!}}- align="center"
! {{Hl2}} {{!}} VolumeDetect
{{!!}} Not Supported
{{!!}} Supported
{{!}}}
 
=====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=
|caveats=
*VolumeDetect objects will fall through the ground, whereas Phantom objects will not.
*It cannot be enabled on attachments{{Footnote|Attachments aren't included in the avatar bounding box, so it's moot}}.
*VolumeDetect cannot be enabled on attachments{{Footnote|Attachments aren't included in the avatar bounding box, so it's moot}}.
*It can only be applied to the root prim (which will make the entire object VolumeDetect).
*Only detects physical objects and avatars.
*It only detects physical objects and avatars.
*Can only be applied to the root prim (which will make the entire object VolumeDetect).
*When moving via [[llSetPos]]() by a loop of stages, {{LSLGC|Collision|collision events}} will not trigger.
*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.
*Attachments will not register collision events when the avatar collides with a VolumeDetect object.
*[[land_collision_start]], [[land_collision_end]] and [[land_collision]] events are not generated anymore after setting VolumeDetect to TRUE.
|constants
|constants
|examples=<lsl>default
|examples=<lsl>default

Revision as of 16:10, 17 October 2009

Summary

Function: llVolumeDetect( integer detect );
0.0 Forced 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

Differences

There are a couple differences in how Phantom and VolumeDetect handle collisions.

Land Collisions Object/Avatar Collisions
Phantom Supported Not Supported
VolumeDetect Not Supported Supported
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

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

Footnotes

  1. ^ Attachments aren't included in the avatar bounding box, so it's moot

Signature

function void llVolumeDetect( integer detect );