SteamVR Teleport

It has been a while since I actually set up teleport system in VR. I was thinking a few months, but it’s probably has been more than a couple years. The last time I implement it was when testing Undead Darling’s high school level. Gosh, that’d be over 3 years now.

Today I start revisiting old projects. One of the portfolio project I started last year was a Japanese Mansion based on a reference book I picked up from Kinokuniya. The original greybox was created in Unity 2019.4.3f1 with URP, and somehow when I tried to add VR portion to it, a lot of things broke. After fiddling with it for half an hour with no solution, I just started a new Unity 2019.1.14f1 project, which I know work fine with SteamVR. I skipped URP this time around too just to save a headache.

After importing the mansion scene and the previously created 3D asset, I just copied SteamVR sdk from other existing VR project, Space Garden VR. We can also download this sdk from Valve’s github.

Once you place SteamVR folder in your project, it will prompt you to create new input set. If it somehow doesn’t ask for it, you can se it through Unity Window > SteamVR Input. If you never set one up, just hit Save and Generate button to create it. We can always modify this later. But we need at least one now so we don’t get issues later. This will create a few more SteamVR related folder.

Now to the teleport portion! You can get a feel of various interaction when you load SteamVR/InteractionSystem/Samples/Interaction_Example scene file. From there, you can try a couple different teleport system, from an area or a point. For this one, I just care about teleporting in big area.

To set up teleport:

1. Place [SteamVR] prefab in the scene, from under SteamVR/Prefabs folder.

2. Add either SteamVR [CameraRig] (from SteamVR/Prefabs) or Player prefab (from SteamVR/InteractionSystem/Core/Prefabs.)

3. Add Teleporting prefab from SteamVR/InteractionSystem/Teleport/Prefabs

4. Create a quad, plane, or box. Add SteamVR Teleport Area script.

5. Line up the teleport area to the surface/object you want to teleport to. THEN increase its Y position value by 0.01 or more. We need to do this to avoid overlap and preventing teleport to access the area.

6. Save scene and start testing!