Search Unity

Light passing through ground? Sun Moon Day Night Cycle

Discussion in 'Global Illumination' started by emilylynndz, Jul 1, 2020.

  1. emilylynndz

    emilylynndz

    Joined:
    Apr 22, 2020
    Posts:
    2
    Hey all,

    I'm very new to Unity so any help is appreciated!

    I'm currently building a really simply house with windows and a day night cycle. I want the light to pass through the windows as the sun and moon rotate. However, when the sun is below the ground (night), the light still passes upwards and illuminates the house. Does anyone know why this would be?





    Any help is appreciated!
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    The simplest solution would be to disable one of your directional lights via script when they dip below the horizon.

    Alternatively, just enable double-sided shadows for your meshes.