Difference between revisions of "Talk:LlVolumeDetect"
(Created page with 'The caveat that llVolumeDetect only detects physical objects or avatars is wrong. It can detect scripted non phys if the script is in a moving physical prim. To allow for the...') |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
The caveat that [[llVolumeDetect]] only detects physical objects or avatars is wrong. It can detect scripted non phys if the script is in a moving physical prim. To allow for the falling through the ground [[llSetBuoyancy]](1.0) first. -- '''[[User:EddyFragment Robonaught|Eddy]]''' <sup><small>([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])</small></sup> 21:07, 8 August 2009 (UTC) | The caveat that [[llVolumeDetect]] only detects physical objects or avatars is wrong. It can detect scripted non phys if the script is in a moving physical prim. To allow for the falling through the ground [[llSetBuoyancy]](1.0) first. -- '''[[User:EddyFragment Robonaught|Eddy]]''' <sup><small>([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])</small></sup> 21:07, 8 August 2009 (UTC) | ||
To clarify this script will detect non-phys active-scripted objects on collision. Just push it into the object to detect.<lsl>integer type; | |||
default | |||
{ | |||
state_entry() | |||
{ | |||
llSetBuoyancy(1.0); | |||
llSetStatus(STATUS_PHYSICS, TRUE); | |||
llVolumeDetect(TRUE); | |||
} | |||
collision_start(integer detected) | |||
{ | |||
type = llDetectedType(0); | |||
if(type == 12)// SCRIPTED & PASSIVE | |||
{ | |||
llSay(0, "I struck a stationary non-physical object (not an avatar) containing an active script"); | |||
} | |||
} | |||
}</lsl>-- [[File:Eddy_CUBE_jpg.jpg|45px|link=User:EddyFragment Robonaught]]'''[[User:EddyFragment Robonaught|Eddy]]''' <sup><small>([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])</small></sup> 22:12, 11 September 2009 (UTC) | |||
It appears that of 1.38 this no longer supports the collision event, just the collision_start and collision_end event. The code must be recompiled under server 1.38 to exhibit this bug. Previously compiled code seems to work fine. [[User:WhiteFire Sondergaard|WhiteFire Sondergaard]] 11:53, 23 April 2010 (UTC) | |||
== Detecting collisions in attachments; text clarifications == | |||
There is some need of clarification/review on the text, since it either is ambiguous or contradictory! | |||
1. "It cannot be enabled on attachments" | |||
But it can! It works perfectly at the date of testing, and collision events are triggered exactly as expected. | |||
2. "Attachments will not register collision events when the avatar collides with a VolumeDetect object." | |||
So this tends to contradict the earlier point, i.e. attachments can, indeed, register collision events, except in the case where the avatar wearing the attachment collides with a llVolumeDetect() object (this should be tested). | |||
I propose that the first statement (and accompanying footnote!) be deleted since it's plainly wrong or at least misleading. | |||
And I suggest that the second statement is rephrased in the following way: | |||
"When llVolumeDetect() is activated on an attachment, it will not register collision events if the avatar wearing the attachment collides with another object which also has llVolumeDetect() active" — subject, of course, to testing that this is actually true. | |||
[[User:Gwyneth Llewelyn|Gwyneth Llewelyn]] 11:04, 14 October 2013 (PDT) | |||
:You are correct the first is wrong but that isn't to say you aren't going down the wrong path. VolumeDetect on attachments is useless, attachments don't collide. Attachments only receive their avatar's collisions. Enabling VolumeDetect does nothing to effect how the avatar collides with things. The second is just awkwardly worded, I can see what they were trying to say. | |||
:I've isolated both and expanded upon them. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 21:22, 14 October 2013 (PDT) |
Latest revision as of 20:22, 14 October 2013
The caveat that llVolumeDetect only detects physical objects or avatars is wrong. It can detect scripted non phys if the script is in a moving physical prim. To allow for the falling through the ground llSetBuoyancy(1.0) first. -- Eddy (talk|contribs) 21:07, 8 August 2009 (UTC)
To clarify this script will detect non-phys active-scripted objects on collision. Just push it into the object to detect.<lsl>integer type;
default {
state_entry() { llSetBuoyancy(1.0); llSetStatus(STATUS_PHYSICS, TRUE); llVolumeDetect(TRUE); } collision_start(integer detected) { type = llDetectedType(0); if(type == 12)// SCRIPTED & PASSIVE { llSay(0, "I struck a stationary non-physical object (not an avatar) containing an active script"); } }
}</lsl>-- Eddy (talk|contribs) 22:12, 11 September 2009 (UTC)
It appears that of 1.38 this no longer supports the collision event, just the collision_start and collision_end event. The code must be recompiled under server 1.38 to exhibit this bug. Previously compiled code seems to work fine. WhiteFire Sondergaard 11:53, 23 April 2010 (UTC)
Detecting collisions in attachments; text clarifications
There is some need of clarification/review on the text, since it either is ambiguous or contradictory!
1. "It cannot be enabled on attachments"
But it can! It works perfectly at the date of testing, and collision events are triggered exactly as expected.
2. "Attachments will not register collision events when the avatar collides with a VolumeDetect object."
So this tends to contradict the earlier point, i.e. attachments can, indeed, register collision events, except in the case where the avatar wearing the attachment collides with a llVolumeDetect() object (this should be tested).
I propose that the first statement (and accompanying footnote!) be deleted since it's plainly wrong or at least misleading.
And I suggest that the second statement is rephrased in the following way:
"When llVolumeDetect() is activated on an attachment, it will not register collision events if the avatar wearing the attachment collides with another object which also has llVolumeDetect() active" — subject, of course, to testing that this is actually true.
Gwyneth Llewelyn 11:04, 14 October 2013 (PDT)
- You are correct the first is wrong but that isn't to say you aren't going down the wrong path. VolumeDetect on attachments is useless, attachments don't collide. Attachments only receive their avatar's collisions. Enabling VolumeDetect does nothing to effect how the avatar collides with things. The second is just awkwardly worded, I can see what they were trying to say.
- I've isolated both and expanded upon them. -- Strife (talk|contribs) 21:22, 14 October 2013 (PDT)