I have a fire that ignites, so suddenly turning a light on looks a bit weird.
instead I want to slowly increase the light intensity but I am not sure how to do this.
This is what I have so far but it instantly goes to the max setting:
You should use instead the deltaTime to do this. You could add the deltaTime or use it as a multiplier factor for some other variable. If you use a while loop it will be executed all in one update function, it won’t be distributed over the frames, that’s why the light goes on suddenly. In other words:
var lightStep : float = 10;
function Update() {
fireLight.light.intensity += lightStep * Time.deltaTime;
}
and then maybe stopping increasing when a certain value has been reached
I wanted to avoid the update function with the while loop, but guess I have no choice,
Did not know the animation editor could be used for things like this, I have a look at that too.