Skip to content

Instantly share code, notes, and snippets.

@Keldrik
Created April 29, 2020 19:35
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 Keldrik/2397f4f3922bd76e1700a9e0f2eb9d3c to your computer and use it in GitHub Desktop.
Save Keldrik/2397f4f3922bd76e1700a9e0f2eb9d3c to your computer and use it in GitHub Desktop.
// Objekt bewegt sich mit einer Geschwindigkeit von 10 nach rechts
var Geschwindigkeit = 10f;
var Richtung = new Vector3(1f, 0f, 0f);
this.transform.position += Richtung * Geschwindigkeit * Time.deltaTime;
// Objekt bewegt sich mit einer Geschwindigkeit von 5 nach oben und mit 10 nach hinten
var Geschwindigkeit = 10f;
var Richtung = new Vector3(0f, 0.5f, -1f);
this.transform.position += Richtung * Geschwindigkeit * Time.deltaTime;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment