Skip to content

Instantly share code, notes, and snippets.

@Keldrik
Created April 29, 2020 19:29
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/c55b43564e51f827810f59637d8a852d to your computer and use it in GitHub Desktop.
Save Keldrik/c55b43564e51f827810f59637d8a852d 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