Is there a way i can make the fog color match the rotation.x of the Directional Light? Is there a way i could smoothly fade a color from black to light blue?
Code Im using:
var rotateSpeed : float = 15.0; //Your speed
var DefaultColor : Color;
var OtherColor : Color;
function Update () //The update function will trigger your object to make it rotate
{
transform.Rotate(Vector3.right * Time.deltaTime * rotateSpeed); //It never stops rotating.
RenderSettings.fogColor = Color.Lerp(DefaultColor, OtherColor, rotateSpeed / 3);
}
function Start()
{
DefaultColor = RenderSettings.fogColor;
OtherColor = Color.black;
}