Hi,
I'm busting my ass trying do get day, night change and I haven't made it at all.
Is there any code for day, night change? Or maybe if some one of you can write it down and post it here. I would be greatfull.
It doesn't have to be to complicated. I implemented moving sun and I want that my sky cube gets darker as sunlight gets and that sky cube changes it's image.
Code:
sun_angle.pan += 0.2 * time_frame;
sun_angle.pan %= 360;
sun_angle.tilt = fsin(sun_angle.pan, 45) + 45;
sun_light = sun_angle.tilt;
Thanks