Author Topic: Change time of day for day/night cycle?  (Read 860 times)


Never mind, I just realized a slider was added for the day/night offset. (I don't think it's always been there.) It's probably a global environment variable that can be changed with that environment update command thingy.

function DCgetTime()
{
   %pas = $Sim::Time/Daycycle.dayLength;
   %tim = %pas - mFloor(%pas);
   while(%tim >= 1)
      %tim--;
   while(%tim < 0)
      %tim++;
   return %tim;
}
function DCsettime(%time)
{
   dayCycle.setDayOffset(%time-DCgetTime());
}