Any Reliable way to sensor > 16 avs in an area?
|
Sapphire Bombay
Avatar
Join date: 8 Oct 2003
Posts: 341
|
10-29-2005 12:35
Sensors return 16 results. You can scan in hemispheres by limiting the arc to PI_BY_TWO. And then turn the forward X axis around and scan again. But, what about the case where > 16 avs are in whatever quadrant you are scanning? Even if you crank that sensor arc way down and rotate your scanner, it seems this would still be unreliable if all your avs at an event were standing in one spot.
Does anyone know of a reliable method of sensoring ALL the avs in an area?
Since returned values are sorted by distance I thought about doing specific radius scans of quadrants. But you can only specify range not min/max range.
_____________________
Avatar: A temporary manifestation or aspect of a continuing entity.
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-29-2005 12:53
Calculate the center of position of the total AVs sensed, then move to a position opposite relative to this point.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Templar Baphomet
Man in Black
Join date: 13 Sep 2005
Posts: 135
|
10-29-2005 14:40
Wouldn't a hemisphere scan be PI rather than PI_BY_TWO since there are 2PI radians in 360 degrees?
I was just playing with something using spinrate with the idea of merging the results of two sequential hemispherical sensors ... a timer event firing a sensor event, waiting 1/2 a revolution and then firing another sensor event. I got bogged down in reliably doing revolutions per second ... it looks as though spinrate needs to be multiplied by time dilation, but that's another thread.
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
10-29-2005 14:56
From: Templar Baphomet Wouldn't a hemisphere scan be PI rather than PI_BY_TWO since there are 2PI radians in 360 degrees? No, it's a radial cone. ( Visualization from the wiki: ) http://www.sdfjkl.org/hosting/lslwiki/sensor_pi_by_four.png
|
Spuds Milk
Registered User
Join date: 28 Sep 2004
Posts: 94
|
10-29-2005 15:17
Scanning in a smaller arc, then pulling the next arc can do it, assuming that there are less than 16 in an arc.
|
Templar Baphomet
Man in Black
Join date: 13 Sep 2005
Posts: 135
|
10-29-2005 15:59
Ah! Cool! Thanks for the link.
|
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
|
10-29-2005 16:10
From: Spuds Milk Scanning in a smaller arc, then pulling the next arc can do it, assuming that there are less than 16 in an arc. Yup. You can do a "lighthouse" sort of sweep by rotating the sensor prim. Also, you can extend the sensor range by up to 30m, if you're sensing from a child prim in a linked set that is rotating about the root.
|
Sapphire Bombay
Avatar
Join date: 8 Oct 2003
Posts: 341
|
10-30-2005 02:59
OK, so doing the lighthouse sweep with a smaller arc (PI/4 = 45degree cone) don't I lose visibility both above and below my scanning object?
_____________________
Avatar: A temporary manifestation or aspect of a continuing entity.
|
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
|
10-30-2005 03:28
You can't rotate up and down as well? 
|
Sapphire Bombay
Avatar
Join date: 8 Oct 2003
Posts: 341
|
10-30-2005 03:40
Right, but now it is just getting silly. Not only do you have to swing 360 on Z. You have to angle up and spin then angle down and spin. It just seems like a contorted method.
_____________________
Avatar: A temporary manifestation or aspect of a continuing entity.
|
Lit Noir
Arrant Knave
Join date: 3 Jan 2004
Posts: 260
|
10-31-2005 09:48
Does the sensor retrieve the 16 closest avs, or is the priority calculated differently? If the former, a sensor grid covering a wide area (multiple prims), hopefully linked, with full range could grab results and then send it off to a consolidation script. In theory. If the latter, then Jesrad's approach would work and that method may be preferable anyway.
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-31-2005 10:03
It detects closest AVs first.
Note: my solution works best when detecting within a half-sphere (with parameter PI_BY_TWO). A variant is to use the furthest detected position as "pivot". For detecting all the AVs in a region for my locator, I moved the sensor prim in a grid-like set of positions, repeating the sensor everytime and agregating the results in a list.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Azrael Baphomet
Registered User
Join date: 13 Sep 2005
Posts: 93
|
10-31-2005 10:34
From: Sapphire Bombay Right, but now it is just getting silly. Not only do you have to swing 360 on Z. You have to angle up and spin then angle down and spin. It just seems like a contorted method. Nature is full of contorted methods, though. Have you ever seen a representation of how the eye scans visual scenes?
|
Issarlk Chatnoir
Cross L. apologist.
Join date: 3 Oct 2004
Posts: 424
|
10-31-2005 15:36
list presentAV; integer listenh;
state detectav { state_entry() { llListenRemove(listenh); listenh = llListen(0, "", NULL_KEY, "present"); llShout(0, "Please everyone, shout 'present' now"); //Give them at least a minute to reply, those dumb club goers llSetTimerEvent(60.0); }
listen(integer c, string n, key id, string m) { presentAV = presentAV + [id]; }
timer() { state dousefulstuffwithinfo; } }
_____________________
Vincit omnia Chaos From: Flugelhorn McHenry Anyway, ignore me, just listen to the cow
|
Templar Baphomet
Man in Black
Join date: 13 Sep 2005
Posts: 135
|
10-31-2005 17:11
From: Issarlk Chatnoir list presentAV; integer listenh;
state detectav { state_entry() { llListenRemove(listenh); listenh = llListen(0, "", NULL_KEY, "present"); llShout(0, "Please everyone, shout 'present' now"); //Give them at least a minute to reply, those dumb club goers llSetTimerEvent(60.0); }
listen(integer c, string n, key id, string m) { presentAV = presentAV + [id]; }
timer() { state dousefulstuffwithinfo; } }
Ship it!! 
|