Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Directional Light not being blocked? <Unity5>

Discussion in 'General Graphics' started by Leoo, Mar 9, 2015.

  1. Leoo

    Leoo

    Joined:
    May 13, 2013
    Posts:
    96
    Hey guys!, maybe this will be some dumb question , or not..

    Why directional lights are not getting blocked anymore by ANY object when in a certain angle?

    Even by those with shadows?, well better than words, a GIF to show you all.

    Is this intended? why? what solution are you guys using while trying to do something like a Time of Day?

    Thanks!
     

    Attached Files:

    • ilum.gif
      ilum.gif
      File size:
      57.4 KB
      Views:
      848
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    The problem is that the sky may update to the orientation of the directional light (the sun) but even if your light is in a position where you normal have night you still get the normal directional light from below.
    You would need a script that changes the intensity of the directional light depended of it angle to make sure that only of the light / sun is in the sky the light shines.
    TwiiK posted a Tutoreal for that.
    http://forum.unity3d.com/threads/ma...o-create-a-day-night-cycle-in-unity-5.308829/
     
  3. Leoo

    Leoo

    Joined:
    May 13, 2013
    Posts:
    96
    Yea i saw that, it has something to do with probe groups... duh.
    Thanks!