Skip to content

Instantly share code, notes, and snippets.

@Keldrik
Created April 29, 2020 19:33
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/03ab579e3014d8af3d01ba89db20f1d9 to your computer and use it in GitHub Desktop.
Save Keldrik/03ab579e3014d8af3d01ba89db20f1d9 to your computer and use it in GitHub Desktop.
// Setzt die Position des script ausführenden GameObjects
// auf x:1, y:0, z:5
this.transform.position.Set(1f, 0f, 5f);
// Hat den selben Effekt, nur weisen wir hier einen
// neuen Vector3 zu
this.transform.position = new Vector3(1f, 0f, 5f);
// Setzt das script ausführende GameObject auf die
// selbe Position wie anderesGameObject
this.transform.position = anderesGameObject.transform.position;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment