Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

A little help with llSensorRepeat, please...

Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
09-08-2008 17:32
Lately I have been working on some vehicles that look for "waypoints" along a pre-set path using llSensor or llSensorRepeat. However I have been having some problems with the sensor looking in ALL directions, when I just want it to look foreward. I know it has to do with the "arc" float, but so far I haven't been able to make sense of that.

I looked at some of the exibits at the Particle Laboratory in Teal, but it appears that the BEGIN and END settings for cone and angle particles do not hold true for llSensor.

I tried using 360, PI, PI/2, PI*2, and a few others.

If anyone can help, I appreciate it ;)


P.S. If it is possible for the sensor to ignore whatever is directly under it, that would be very helpful... I have also been having problems with the sensor only detecting the same waypoint over and over again.
_____________________
Life is a highway... And I just missed my exit.
Kaluura Boa
Polygon Project
Join date: 27 Mar 2007
Posts: 194
09-08-2008 20:22
The cone of a sensor is aligned on the X axis of the prim containing the script. It's a cone in a sphere so the angle you can give goes from 0 (a cone as thin as a line in front of the prim) to PI (full sphere).

Rez a sphere, set the rotations to zero and play with the second dimple value (1.0). That's how the sensor cone behaves. 1.0 x PI = full sphere, 0.5 x PI = half-sphere, 0,25 x PI = quarter of sphere, etc.

If you don't want your sensor to detect what's below it, use an arc lower than PI_BY_TWO (dimple: 0.5) like PI/3.0 (dimple: 0.33333), PI/4.0 (dimple: 0.25), etc.

But don't forget that the more you increase the radius of the sensor, the wider the cone becomes at the end of this radius. It may become tricky.

If I were you, I'd store the positions of the way points so that your vehicle has only to retrieve the coordinates in its inventory. No wasted prims, no CPU-hungry sensor, 100% reliable.

Just my L$0.02...
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
09-08-2008 22:24
Thank you for explaining this in a way a novice like me can understand :)

As for storing the coordinates ahead of time, I dont think that would work for my project... I'm trying to make a train system that's atually EASY to use (just lay the track and go).

Once again thank you VERY much for your help :D
_____________________
Life is a highway... And I just missed my exit.