Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@matt123miller
Last active July 4, 2017 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matt123miller/f1a805b290e73e73ece4dffacae9b755 to your computer and use it in GitHub Desktop.
Save matt123miller/f1a805b290e73e73ece4dffacae9b755 to your computer and use it in GitHub Desktop.
transform.position = Vector3.lerp(transform.position, target.position, Time.deltaTime)
// Or sometimes with an arbitrary multiplier to time, changing the lerp rate.
float lerpMod = ???; // Some formula
transform.position = Vector3.lerp(transform.position, target.position, Time.deltaTime * lerpMod)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment