Beginning with the XR Interaction Toolkit
Having got a project onto a VR headset with the previous recipe, let’s add some interaction with the XR Interaction Toolkit. Player interaction with VR projects involves very different components and user actions than for typical first- or third-person controllers. Players may move via teleportation, so they have to be able to select the destination point they wish to teleport to. Hand controllers and even human hand tracking can be used to allow users to grab, release, and move objects. Alternatively, they may select objects with laser raycasts. Real-world interactable components can be simulated, such as press-in buttons, levers, and switches. The XR Interaction Toolkit provides features for all of these VR interactions, and its samples allow us to get to know, and repurpose, examples of different interactables in a playground VR scene.
In this recipe, you’ll create a scene with an XR Origin from the XR Interaction Toolkit...