Unity – Time.deltaTime

The time in seconds it took to complete the last frame (Read Only).
Use this function to make your game frame rate independent, and for smoot movements.

1
2
3
4
5
6
7
#pragma strict
 
function Update () {
        // Move the object 10 meters per second!
        var translation : float = Time.deltaTime * 10;
        transform.Translate (translation, 0, 0);
    }