VR First Run Checks (using VRTK)
Tutorial
·
Beginner
·
+10XP
·
30 mins
·
(49)
Unity Technologies
Set up Unity to enable the use of virtual reality.
Languages available:
1. First Run: Setting up for VR
To begin a virtual reality project, we need to first setup Unity with a few specific settings.
- Go to the Edit > Project Settings > Player
- Under "XR Settings", ensure "Virtual Reality Supported" is checkmarked.
- Under "Other Settings", make sure that in the Configuration section, the Scripting Runtime Version is set to ".NET 4.x Equivalent". Close the Project Settings
- Under Window > Package Manager menu, select "OpenVR (Desktop)" and choose Install. Close the menu.
Test the Example Scene
To test out your setup, open the ExampleScene that comes with VRTK
In the Project window, go to Assets > VRTK > Samples > Farm > Scenes and open the ExampleScene.
Tip: To speed up load time when entering play mode, select "Maximize on Play" at the top of the Game window. This relieves Unity from having to render the Scene window and Game window simultaneously.
2. No VR Hardware? No Problem. (Using the VR Simulated Camera Rig)
If you won't have VR hardware to test on, you can still build VR projects.
- Enter play mode and click "Simulated CameraRig" to switch modes.
- Press the 1 key on your keyboard, and you can now "drive" your character around using the WASD to steer, and the mouse to change your view.
- To "drive" your left hand, press 2.
- To "drive" your right hand, press 3.
- To reset your character's position back to the starting point, press 4.
- To reset your hands back to being in front of you, press 5.
- To interact with objects like fence gates, the scarecrow, and pick up items, click and hold the left mouse button to simulate "grabbing" objects in the virtual world.