|
Strollerweb Market
Registered User
Join date: 20 Nov 2006
Posts: 21
|
03-19-2007 05:47
Is there a way to detect when an Avatar passes between two posts (like a skiing slalom)
I found scripts that detect when the Avatar is near etc but have not figured a way to detect which side of the post they are on. I want to be able to say they passed between two posts and not went around or over them.
I could properly use llGetPostion() and work out all the coordinates but would like it to do so the posts can be moved easily. From there I will be looking to detect how far they have traveled from these post in a set time period.
|
|
Atashi Toshihiko
Frequently Befuddled
Join date: 7 Dec 2006
Posts: 1,423
|
03-19-2007 05:50
Put an invisible phantom prim between the posts and use the collision event. If you don't mind the posts being phantom, link the posts and the invisible prim together so they can be moved together easily.
Then when an av goes between the posts they are passing through the invisible phantom prim, and the phantom prim records the collision event and you can use all the llDetected functions and go from there.
-Atashi
_____________________
Visit Atashi's Art and Oddities Store and the Waikiti Motor Works at beautiful Waikiti.
|
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
03-19-2007 05:52
Place prims between the posts, link them together and then use llVolumeDetect in a script you put in those prims (make them phantom and invisible). Then communicate the detected key to whereever you need to.
|
|
Strollerweb Market
Registered User
Join date: 20 Nov 2006
Posts: 21
|
03-19-2007 09:11
Of Course, Easy when someone (if not two) points the way!!
Squirrel not come across the llVolumeDetect do you have an example of that?
and thanks again.
|
|
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
|
03-19-2007 09:38
From: Strollerweb Market Of Course, Easy when someone (if not two) points the way!!
Squirrel not come across the llVolumeDetect do you have an example of that?
and thanks again. If I may.... http://www.lslwiki.net/lslwiki/wakka.php?wakka=LlVolumeDetectFrom: the Wiki llVolumeDetect(TRUE);
It's really a very simple function; all it does is turn a prim phantom *in such a way that collisions are still detected*. Normally phantom prims do not register collisions at all. Be careful not to make the prim phantom by the usual means or it breaks the magical "VolumeDetect-ness". Once you have this prim which both detects collisions and is phantom (so the avatar can pass through it), it's just a matter of using collision_start to grab the collision and expose such useful things as llDetectedKey or llDetectedName for reporting whatever you need to report 
|
|
Atashi Toshihiko
Frequently Befuddled
Join date: 7 Dec 2006
Posts: 1,423
|
03-19-2007 10:26
From: Anti Antonelli Normally phantom prims do not register collisions at all. Ooo I had no idea of this! Thanks for the pointer... I've used collision events quite a bit but perhaps I've not yet tried them in combination with phantom objects. -Atashi
_____________________
Visit Atashi's Art and Oddities Store and the Waikiti Motor Works at beautiful Waikiti.
|