|
Sollie Villota
Registered User
Join date: 22 Jun 2007
Posts: 46
|
03-15-2008 03:46
Not the typical sort of question from what I can tell, but here it goes. What is the correct way to make a sensor as "small" as possible? This is for use on an attachment to be used in Mouselook, so the angle wouldn't be an issue, I just am having trouble using what I am currently using. Is this way correct or not? "PI / 1000" (which is what I am using for my 'float arc') barely works, but it seems to just depend on where I am aiming at on certain scripted objects. I am either doing something really wrong or I am just at the limits of a limited scripting language. Any ideas?
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
03-15-2008 05:40
sensor picks up object centers, so smaller isn't necessarily better
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Haplo Voss
Registered User
Join date: 18 Nov 2006
Posts: 137
|
03-15-2008 06:25
You might also just try using a variation on the sensor cone.
I've found that a reasonable sized "directional" sensor works pretty good. I use PI/50 myself and it seems to work really well for detecting object / avatars in whatever direction I'm facing.
Like Void said... too small and you will start eliminating possible pings after a while.
|
|
Sollie Villota
Registered User
Join date: 22 Jun 2007
Posts: 46
|
03-15-2008 12:02
I was affraid of that! Same thing for avatars I presume?
And thanks for the info, I would use PI/50 but I need it for long ranges.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
03-15-2008 18:06
yup same for avatars, I made a visible cone demo for a friend, that you could walk into, if he hips don't go in, the sensor doesn't fire... have fun looking at av's crotches...
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
03-16-2008 11:57
It won't help with the efficiency of the sensor, but if you want to test whether a sensed object intersects with the primary axis of the sensor (x-axis) after you widen the arc, you could use llGetBoundingBox() to approximate the size (and maybe shape to some degree) of the object, then do some very simple ray tracing.
|