|
Daisy Rimbaud
Registered User
Join date: 12 Oct 2006
Posts: 764
|
01-13-2007 16:24
What's the best way to get a narrow sensor arc either vertically above or below a prim?
|
|
Zaphod Kotobide
zOMGWTFPME!
Join date: 19 Oct 2006
Posts: 2,087
|
01-13-2007 18:34
From: Daisy Rimbaud What's the best way to get a narrow sensor arc either vertically above or below a prim? use the "arc" parameter.. remember that as you decrease this value, the sweep will move toward the positive direction of the object's X axis. So you'll need to rotate the prim accordingly. You cannot have a directional sensor sweep originating from more than one axis.. so if your intent is to scan above -and- below, you'll need two prims. I don't think there exists better documentation for this than on the wiki itself: http://www.lslwiki.com/lslwiki/wakka.php?wakka=llSensor
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
01-13-2007 23:28
From: Zaphod Kotobide You cannot have a directional sensor sweep originating from more than one axis.. so if your intent is to scan above -and- below, you'll need two prims.
I don't think there exists better documentation for this than on the wiki itself: http://www.lslwiki.com/lslwiki/wakka.php?wakka=llSensor Or you could just switch sensor scan parameters on a timer or sweep counter....
|
|
Daisy Rimbaud
Registered User
Join date: 12 Oct 2006
Posts: 764
|
01-14-2007 04:05
I may be being dim here. It seems to me that rotating the prim doesn't change the direction of the x-axis (along which the sensor scans). Or am I confusing local and global axes? I suspect I am ...
|
|
Zaphod Kotobide
zOMGWTFPME!
Join date: 19 Oct 2006
Posts: 2,087
|
01-14-2007 04:25
Yes, think local in this case.
|
|
Zaphod Kotobide
zOMGWTFPME!
Join date: 19 Oct 2006
Posts: 2,087
|
01-14-2007 05:05
From: Newgate Ludd Or you could just switch sensor scan parameters on a timer or sweep counter.... Sorta. What I mean by that is if your intent is to have a narrow "beam", that beam is tied to the local, positive x axis. There isn't a way to point it in the opposite direction and retain its directional characteristic.. you'd need to basically turn it into a full sphere, IE 180 degrees/PI. It would be cool to be able to tell it, via an argument, which axis to work on, but so far as I can tell, that's not possible. That being said, I suppose you could rotate it back and forth 180 at the end of each sweep..
|
|
Nava Muni
Registered User
Join date: 27 Dec 2006
Posts: 10
|
01-14-2007 06:49
From: Daisy Rimbaud I may be being dim here. It seems to me that rotating the prim doesn't change the direction of the x-axis (along which the sensor scans). Or am I confusing local and global axes? I suspect I am ... I believe what the Wiki is saying for llSensor() is that the "sensor cone" is always active along the prim's local X axis. You can expand or contract this cone via the "arc" parameter. However, you can rotate the prim using llSetRot() and scan in another regional direction. In other words, the scan is always along the prim's X axis but you can change where that X axis "points" in the region using llSetRot(). So if you want to scan UP (regional Z axis) in a narrow beam, use a small "arc" value and rotate your prim in a positive direction on its Y axis. That will point the prim's local X "up."
|
|
Daisy Rimbaud
Registered User
Join date: 12 Oct 2006
Posts: 764
|
01-15-2007 00:30
I found a smart way round this. I wrote a one-line function to get horizontal distance from the sensor. Result: a cylindrical up-down detection area! Just what I needed.
|