Update/FixedUpdade question.

Imagine, please, that I have a complex object on the stage. I press a button and object’s color changes smoothly from one color to another. I’m using Color.Lerp() function inside Update() function to achieve this.

Now here is the question: when I run this application on powerful hardware - the color transition goes during 1 sec, and when I run it on weak hardware - 3 secs. I believe this happens because of different frame rate (caused by different hardware performance). Is there any way to control the time of transition? (may be to use FixedUpdate() function or smth else). So the transition will run the same speed on different machines.

Thanks!

FixedUpdate is not for this. It’s for physics; don’t even think about it.

http://unity3d.com/support/documentation/ScriptReference/index.Keeping_Track_of_Time.html

That’s not the end of it, either! There are actually a whole lot of other helpful pages like that, mang!