Difference between revisions of "Collision"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 5: Line 5:
|spec
|spec
|caveats=
|caveats=
Will not detect collisions with [[ground]]; use [[land_collision]] instead.
* Will not detect collisions with [[ground]]; use [[land_collision]] instead.
Will not detect collisions between the [[avatar]] sitting on the task.
* Will not detect collisions between the [[avatar]] sitting on the task.
|examples=<lsl>//Will turn phantom when someone bumps into it if on the list
|examples=<lsl>//Will turn phantom when someone bumps into it if on the list



Revision as of 14:20, 20 January 2010

Description

Event: collision( integer num_detected ){ ; }

Triggered while task is colliding with another task.

• integer num_detected

Caveats

  • Will not detect collisions with ground; use land_collision instead.
  • Will not detect collisions between the avatar sitting on the task.


Examples

<lsl>//Will turn phantom when someone bumps into it if on the list

list access_list = ["Governor Linden"];

default {

   collision(integer num_detected)
   {
       if(~llListFindList(access_list, (list)llDetectedName(0)))
       {
           llSetStatus(STATUS_PHANTOM, TRUE);
       }
   }

}</lsl>

See Also

Deep Notes

Issues

All Issues

~ Search JIRA for related Issues
   Add enumeration to llPassCollisions() to provide PASS_ALWAYS, PASS_IF_NOT_HANDLED, and PASS_NEVER as explicit options.
(Was: Collisions passed to parent REGARDLESS llPassCollisions(FALSE) in child)

Signature

event void collision( integer num_detected );