Is there any way to detect the amount of ambient light to turn on lights? Or is the only way to approximate based on the time of day as found in the wiki at http://secondlife.com/badgeo/wakka.php?wakka=llGetSunDirection?
Thanks!
These forums are CLOSED. Please visit the new forums HERE
Time of Day / amount of light |
|
|
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
|
03-06-2006 16:58
Is there any way to detect the amount of ambient light to turn on lights? Or is the only way to approximate based on the time of day as found in the wiki at http://secondlife.com/badgeo/wakka.php?wakka=llGetSunDirection?
Thanks! |
|
Jher Quartermass
Registered User
Join date: 24 Sep 2004
Posts: 18
|
position of the sun as a variable
03-07-2006 20:51
I've done this before.. In a very simple on/off way, you can do this:
CODE default {If you want more granularity, change the sun.z math. Like so: CODE if ((sun.z > 0.0) && (sun.z < 0.10)) {etc... Night time also works, its just negative. this script looks at the sun or the moon. CODE if ((sun.z > 0.01) && (sun.z < 0.99)) { |