|
Adam Ramona
Registered User
Join date: 5 Jan 2005
Posts: 56
|
02-03-2007 23:54
How do I manipulate the arc in llSensor to get it to detect only a height of 10m? In other words, I want to know if an agent is within this 50x26x10 box.
The 50m X-axis is fine, I don't care about the Y-axis, but I need the Z-axis detection to be only 10m high.
Alternatively, how can I llGetPos on the detected agent, so I can then filter?
Regards, Adam
|
|
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
|
02-04-2007 00:26
You may want to look at placing sensor prims... if the box is stationary... and have them use llVolumeDetect(). The alternative is to use the sphere-shaped range that llSensor has, and then check llDetectedPos(n) of the detected targets to see if it is within the x,y,z box you want to check. Hope that helps! =D
_____________________
* The Particle Laboratory * - One of SecondLife's Oldest Learning Resources. Free particle, control and targetting scripts. Numerous in-depth visual demonstrations, and multiple sandbox areas. - Stop by and try out Jopsy's new "Porgan 1800" an advanced steampunk styled 'particle organ' and the new particle texture store!
|
|
Woopsy Dazy
Registered User
Join date: 12 Nov 2006
Posts: 173
|
02-04-2007 01:18
Not an answer to your question but I'll post it anyway.
To solve the X,Y range to exactly cover my land-square only, I used a combo of llSensorRepeat and llOverMyLand-function. Pretty useful. Just make the sensor circle bigger than you land then discard all keys that are not over your land. Not sure if there's any agent-altitude-function in LSL, that would solve it.
|
|
Woopsy Dazy
Registered User
Join date: 12 Nov 2006
Posts: 173
|
02-04-2007 01:25
Ah yes! Jopsy added the missing command  There's your soloution. Make a sphere large enough to cover your land. Then add llOverMyLand to verify XY and llDetectedPos to verify Z. Should work 
|
|
Adam Ramona
Registered User
Join date: 5 Jan 2005
Posts: 56
|
02-04-2007 01:32
Thanks Jopsy! From: someone You may want to look at placing sensor prims... if the box is stationary... and have them use llVolumeDetect().
Yes, that was my backup plan, but it seems a little inelegant  From: someone The alternative is to use the sphere-shaped range that llSensor has, and then check llDetectedPos(n) of the detected targets to see if it is within the x,y,z box you want to check.
That's exactly what I was looking for! For some reason, llDetectedPos had evaded my searching on the wiki. Thanks again Jopsy, I'm sure this will work fine. Woopsy's llOverMyLand suggestion is a good one, and I have used it in a visitor sensor I built, but in this case it wont' help. Woopsy and Jopsy, thanks for the helpsy 
|