|
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
|
02-06-2006 19:06
Being able to click something from far away is unrealistic. An option to set a touch distance would be nice. touch(integer touches, float distance) touch_start(integer touches, float distance) touch_end(integer touches, float distance) Using llSensor to detect if an av is within a certain distance is a workaround, but the touch action (pointed hand mouse cursor) can still be triggered and seen (particles).
|
|
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
|
02-07-2006 00:32
Eep, you can use llDetectedPos in all three touch events. touch_start(integer num_detected) { vector MyPosition = llGetPos(); integer i; for (i=0 ; i<num_detected ; ++i) if (llVecDist(MyPosition, llDetectedPos(i)) < THRESHOLD) ; // do something } Sorry, I know it doesn't answer your concerns about the cursor and particles - just mentioning as a better alternative to a sensor.
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
02-07-2006 10:19
From: Eep Quirk Being able to click something from far away is unrealistic. An option to set a touch distance would be nice. As noted, you can detect the distance of the toucher easily enough. Also, your proposed syntax doesn't work... you can't force parameters into the arguments of an event handler, which is what it looks like you're trying to do. And since you can have multiple touches, a single distance can't be used in the event handler anyway. What you're looking for is something like a llSetTouchRange(float meters);, I think... touches from avatars outside that range would simply be ignored.
|
|
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
|
02-07-2006 13:37
From: Ben Bacon Eep, you can use llDetectedPos in all three touch events. ... Sorry, I know it doesn't answer your concerns about the cursor and particles - just mentioning as a better alternative to a sensor. Thanks, Ben! That works decently enough though is more code than I care to add (but don't have any choice at this time).
|