hi there,
found a script changing skybox-color when pressing a key, which is wonderful. my question now is, how can i smooth this animation with an easing-in/-out?
maybe anyone can help!
here is my code:
var color1 = Color.red;
var color2 = Color.blue;
var duration = 10;
function Start() {
}
function Update () {
if (Input.GetKey(KeyCode.Return)) {
camera.backgroundColor = color1;
} else {
camera.backgroundColor = color2;
}
}
thank you! andreas