Quantcast
Channel: Latest Questions by Chesley
Viewing all articles
Browse latest Browse all 62

Color.Lerp does not update

$
0
0
I'm working on a day/night cycle script, and I'm totally done except for the Color.Lerp when 1 day/night cycle is set to 1 minute, the speed of the Color.Lerp is 0.004 it takes like 2-4 seconds when cycle is set to 2 minutes color lerp is set to 0.002 (50%, with is good!) but when i set the cycle to more than 10 minutes Color.Lerp isn't really slow but it just doesn't work is this because unity cuts floats with more than 3 characters behind the comma some code (Thats bassicly how i do it) var CycleInMinutes = 12; var Day : Color; private var CurrentSkyColor : Color; function Update () { skycolor.camera.backgroundColor = CurrentSkyColor; CurrentSkyColor = Color.Lerp(CurrentSkyColor,Day,Time.deltaTime * 0.004 / CycleInMinutes); }

Viewing all articles
Browse latest Browse all 62

Trending Articles