# Teleport Players

### Interact Teleport

*Teleport the player when they click on an object, e.g. a door knob*

* Add Sphere to your scene, this will act as your door knob
* Check the `Is Trigger` box on the Sphere Collider
* Add an Interact Trigger component to it and click "Convert to UdonBehaviour"

![](https://1714596913-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQWbrSe37gNXUDtQ8DJ%2F-MVQIpAQosw_3sDx_zR9%2F-MVQJw24R0p0ZwrHchQ8%2FcJpmoaJDJM.gif?alt=media\&token=2af9dabf-a7f8-4038-8859-b279e1008880)

* Create a new Empty GameObject and put it where you want your player to be teleported to
* Name it something nice, like "Room Teleport"
* Make sure you are in the Local view and rotate the object so the blue (Z) arrow is pointing where you want the player to look after the teleport

{% embed url="<https://gfycat.com/wigglycorruptgoral>" %}

* Add a Teleporter component to this new Game Object and click "Convert to Udon Behaviour"
* Click "Teleport Player" and drag and drop the GameObject itself into the Teleport Target field

{% embed url="<https://gfycat.com/poorsecondarybluebreastedkookaburra>" %}

* Select the Sphere you added originally
* Click on the "Udon Events List" foldout in the Interact Trigger
* Drag and Drop the "Room Teleport" object onto the "Udon Events List" foldout header&#x20;
* It should now say "Udon Events List \[1]" and you should have your Room Teleport there with a `Trigger` event selected to the right

{% embed url="<https://gfycat.com/maleinexperiencedbat>" %}

{% hint style="success" %}
That's it! Now when the player clicks on your sphere - they will get teleported!

Check out the [full documentation of the Teleporter](https://ut.orels.sh/behaviours/misc-behaviours#teleporter) to learn more about it
{% endhint %}

### Area Trigger Teleport

*Teleports the player when they enter a trigger*

* Add a new Empty Game object to the scene and position it roughly where you want your trigger to go, e.g. a portal entrance
* Name it something nice like "Portal Trigger"
* Click on the Layer dropdown on the top of the inspector and set it to MirrorReflection layer (to avoid issues with player's interaction laser)
* Add a Box Collider component to the Portal Trigger and check "Is Trigger" checkbox

![](https://1714596913-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQWbrSe37gNXUDtQ8DJ%2F-MVQIpAQosw_3sDx_zR9%2F-MVQTqx3k43LYlWKlnfe%2Fimage.png?alt=media\&token=29b76237-6c4e-4046-a1e7-ffaf929fe63b)

* Set the collider size the way you need it
* Add an Area Trigger component and click "Convert To Udon Behaviour"
* Click "Collide with Players" and check "Collide with Local Players" checkbox

{% embed url="<https://gfycat.com/delectabletastyintermediateegret>" %}

Now for the teleport exit

* Add a new Empty GameObject and call it something nice, for example "Portal Exit"
* Add a Teleporter component to it and click Teleport Players
* Drag and drop the Portal Exit object itself into the Teleport Target field

{% embed url="<https://gfycat.com/weirdangryduckling>" %}

Now to connect it all

* Select your Portal Trigger and expand the Enter Events List foldout by clicking on it
* Drag and drop your Portal Exit object onto the Enter Events List foldout header
* It should appear in the list with `Trigger` selected as an event to send

{% embed url="<https://gfycat.com/impishhardtofinddiscus>" %}

{% hint style="success" %}
That's it! Now when the player enters the trigger - they will get teleported!

Check out the [full documentation of the Teleporter](https://ut.orels.sh/behaviours/misc-behaviours#teleporter) to learn more about it
{% endhint %}
