-
-
Notifications
You must be signed in to change notification settings - Fork 1
Easy Doors
Child of the Beast edited this page Apr 1, 2022
·
4 revisions
The latest release of the toolkit introduces a really simple way to create doors.
Just right click your Hierarchy as you would when creating any new object, go to the bottom of your now open context menu, and go under /UdonVR/EasyDoors/
.
You will have 3 options to pick from:
-
PlayerTeleports
you can read more about this here. TL;DR it's a TP list that EasyDoors pulls from to give all your doors a dropdown menu of all your TP points. -
Spawn
This spawns a door already setup with a TP point. This is the recommended option to use. -
NoSpawn
This spawns a door with no TP point setup. This is for id you already have a TP point in mind or are using PlayerTeleports for your TP points.
- (Import the UdonVR-Toolkit Package from here if not already done)
- Create your Door model. This can be anything, as long as it has a collider. Place the model in your scene.
- Add a
Udon Behaviour
component to your model. - Drag the
PlayerInteractTeleport
UdonSharp script into theProgram Source
option. - Create a new empty, and place it where the player should spawn after entering your door.
- Drag the new empty into the
Target Location
field. - If you want, you can also change the
Target Position
,Target Rotation
andTarget Orientation
(I recommend leaving it as default) properties to match your world. - Optional: Select all events when you want the player to teleport.
-
Nothing
disables the door. -
Everything
enables every event. -
On Interact
means that the player will have to click on the door to get teleported. -
On Enter
means that the player will get teleported when they enter the collider [^1]. -
On Exit
means that the player will get teleported when they leave the collider [^1] (eg. they walked "through" the door).
-
- Optional: Enable Lerp to remote. It means that other players will see the teleporting player "Move" to the Target Location instead of instantly teleporting there.
[^1]: You will have to set the collider to Is Trigger
for On Enter
and On Exit
to work. Note, that this will disable the actual collision of the collider, so your player may be able to walk through the door object. In version 6.4+
this is now done for you.