Teleporting a Game-object

So I’m building a simple game (I’m a noob) and what I want to do is the following… when a cube reaches a certain height I want the cube to be
generated/teleported into a specified or random position :)) I’m using JavaScript BTW :slight_smile:

Thanks in Advance

I will lead you in the general direction.

  1. Create an Empty GameObject at the
    place you want to teleport to
    (destination).
  2. Create a method of checking
    Player’s distance from ground.

Now, you can shoot a raycast from your player, to the ground below to calculate player’s distance from ground.
After that, create “If” statements to check that "if the player is above (insert #) height, then change location and rotation of player to the empty gameobject (step 1).

This is how I have done it, and it works perfectly. Check the Unity wiki for information on location/rotation lines, they are fairly easy to learn. Good luck!

-* If you feel that this has helped you, please thumbs it up *-

=)