Skip to content

Instantly share code, notes, and snippets.

@Maxime66410
Created October 25, 2024 08:05
Show Gist options
  • Save Maxime66410/92cd9ea0ca1e05fa7b96b19c5891aee9 to your computer and use it in GitHub Desktop.
Save Maxime66410/92cd9ea0ca1e05fa7b96b19c5891aee9 to your computer and use it in GitHub Desktop.
transform.position = new Vector3(transform.position.x, spawnHeight, transform.position.z); // Set the player's position to the new spawn height
transform.Rotate(new Vector3(180, 0, 0)); // Rotate the player to the new world
rb.gravityScale = -rb.gravityScale; // Invert the gravity scale of the player
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment