Search Unity

Day and night cycle

Discussion in 'Getting Started' started by Harrison1545, Oct 1, 2015.

  1. Harrison1545

    Harrison1545

    Joined:
    Sep 26, 2015
    Posts:
    14
    Hello guys, so i thought it would be a good idea to make a simple day and night cycle however is there a way so when it is night it doesn't go completely black? Here is the script if you are interested

    var cyclemins: float;
    var cyclecalc: float;

    cyclemins = 1;
    cyclecalc = 0.1/cyclemins *-1;

    function Update () {
    transform.Rotate(0, 0, cyclecalc, Space.World);
    }


    Thanks.
     
    Last edited: Oct 1, 2015
  2. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    814
    What is that script doing?
     
  3. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    If you add some ambient light to your scene in the Lighting window, you'll have a minimum amount of light even when objects don't receive direct lighting.