Advertisement
Deozaan

Day / Night Cycle

Jul 31st, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. http://forum.unity3d.com/threads/4-seasons.185254/#post-1402399
  2.  
  3. I use directional light, so, if you have a clock that is in float, let's say it goes from 0 to 1440 (seconds), what you can do is create a directional light (the sun) and put an animation in it, from 0 to 60 seconds it makes a complete round (30 seconds = noon) , in this animation you can make anything you want, for each part of the day you can set a different color, intensity and if it is enabled or not, then on script you tell the animation speed to be 0 and the animation.time will be yourClockNormalizedFloat... My English is not so good so I don't know if I was clear, let me know if you get it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement