Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sensor limited to 16?

JPT62089 Agnon
Registered User
Join date: 12 Oct 2005
Posts: 481
07-09-2008 16:25
Every time I do something with Sensors it can only find up to 16 people no matter how many people are within 96m. Is this LSL being insanely awesome again?
_____________________
MacBook Pro 15.4" Core2Duo 2.33GHz.
Wildefire Walcott
Heartbreaking
Join date: 8 Nov 2005
Posts: 2,156
07-09-2008 16:48
The max has been 16 for as long as I can remember:
_____________________
Desperation Isle Estates: Great prices, great neighbors, great service!
http://desperationisle.blogspot.com/

New Desperation Isle: The prettiest BDSM Playground and Fetish Mall in SL!
http://desperationisle.com/

Desperation Isle Productions: Skyboxes for lots (and budgets) of all sizes!
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
07-09-2008 23:31
Any sensor will only ever detect up to 16 avatars/prims/objects.

To detect more, make your sensor "beam" smaller and scan the area with different angled sensor beams.

For example, set the cone to not cover the full 360 degrees but only one quarter. (start/end angle) and then do four scans. one for each quarter. You can detect up to 64 objects/avatars using this method.

You can, however make the cone even smaller and detect even more.
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
07-10-2008 01:24
Reducing the sensor distance will reduce the number of hits. Maybe you have to move the sensor around or have more sensors.
You can also limit the number of hits by using filters i.e. being more specific about what you are looking for, when you set up the sensor...
nobody but JPT62089 Agnon knows why he ask, so it is hard to give any advise
_____________________
From Studio Dora
Demon Lilliehook
Registered User
Join date: 8 May 2007
Posts: 25
07-16-2008 10:24
From: Squirrel Wood
Any sensor will only ever detect up to 16 avatars/prims/objects.

To detect more, make your sensor "beam" smaller and scan the area with different angled sensor beams.

For example, set the cone to not cover the full 360 degrees but only one quarter. (start/end angle) and then do four scans. one for each quarter. You can detect up to 64 objects/avatars using this method.

You can, however make the cone even smaller and detect even more.


how do you do that?

do u have a example?
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
07-16-2008 10:41
Here is an example. The sensor's arc starts along the x-axis of the prim that the script is in. Therefore if you construct an object out of two prims and point their x-axes in opposite directions, giving each of their sensors an arc of PI_BY_TWO (pi/2), you theoretically could keep track of 32 targets in the right circumstances. This is NOT the same as magically having an increased limit of 32, because if all the interesting targets happen to group themselves on one side of your object (where they all happen to be in the arc of one of your sensors), you'll still only get back 16.
Demon Lilliehook
Registered User
Join date: 8 May 2007
Posts: 25
07-16-2008 10:56
From: Hewee Zetkin
Here is an example. The sensor's arc starts along the x-axis of the prim that the script is in. Therefore if you construct an object out of two prims and point their x-axes in opposite directions, giving each of their sensors an arc of PI_BY_TWO (pi/2), you theoretically could keep track of 32 targets in the right circumstances. This is NOT the same as magically having an increased limit of 32, because if all the interesting targets happen to group themselves on one side of your object (where they all happen to be in the arc of one of your sensors), you'll still only get back 16.


is there not mathematical way?
1/4 pi, 0-90º
1/4 from 91º tot 180
.... 181º tot 270
271 tot 360.

without using multiple prims?
linkmessages, ect ect.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
07-16-2008 22:24
From: Demon Lilliehook
is there not mathematical way?
1/4 pi, 0-90º
1/4 from 91º tot 180
.... 181º tot 270
271 tot 360.

without using multiple prims?
linkmessages, ect ect.

No there isn't. A sensor always detects an arc measured from the prim's x-axis starting at zero and ending at the angle given. Two sensors run on the same prim, even in different scripts, will always see a common subset of targets that are close to the x-axis. See http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSensor
Potissimus LeSabre
Registered User
Join date: 26 Jul 2006
Posts: 16
08-17-2008 04:35
From: Hewee Zetkin
No there isn't. A sensor always detects an arc measured from the prim's x-axis starting at zero and ending at the angle given. Two sensors run on the same prim, even in different scripts, will always see a common subset of targets that are close to the x-axis. See http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSensor

Of course, you can have your prim do multiple sensors while changing the rotation in between. ie.

llSetRot(<0,0,0>;);
llSensor("","",AGENT,96,PI_BY_TWO);
llSetRot(<180.0,0,0>;);
llSensor("",""AGENT,96,PI_BY_TWO);

This would double your agent amount, provided all of them are not in the first 180 degrees of the angle. Of course, you could set it to do smaller scans, and have it rotate accordingly for each step. And, of course, if you turn it on it's Y axis, the arc would be more productive in most situations. Now, this is all theory on my part, just started looking into sensors myself, but the logic is sound.
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
08-17-2008 13:10
likewise, you could build an "array" of sensors, similar to sections of an orange, or pieces of a pizza. Each sensor could return up to 16 avatars. You're really only limited to the number of prims you're willing to dedicate to this prospect.

You may also be able to have multiple sensor scripts in a single prim. I'm not sure of the effectiveness of that, but it might be possible.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
08-17-2008 13:49
From: Winter Ventura
You may also be able to have multiple sensor scripts in a single prim. I'm not sure of the effectiveness of that, but it might be possible.

Doesn't work very well. The direction of the sensor is based on the prim's direction, and since you can't specify a starting angle for the sensor arc, one sensor's results will be a subset of the other's (unless it just so happens that some targets in the larger arc are closer than some in the narrower arc). So you really need multiple prims (or a time-sliced solution such as the proposed one of running the sensor then turning the prim and running another), not just multiple scripts.