Skip to content

Instantly share code, notes, and snippets.

@tracend
Created March 29, 2011 23:24
Show Gist options
  • Save tracend/893559 to your computer and use it in GitHub Desktop.
Save tracend/893559 to your computer and use it in GitHub Desktop.
Unity3D: Frame rate independent calculations using Time.deltaTime - Source: http://unity3d.com/support/documentation/ScriptReference/Time-deltaTime.html
function Update () {
// Move the object 10 meters per second!
var translation : float = Time.deltaTime * 10;
transform.Translate (0, 0, translation);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment