Please Select Your Location
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malta
المملكة العربية السعودية (Arabic)
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Please Select Your Location
België
Česká republika
Denmark
Iceland
Ireland
Italia
Latvija
Lietuva
Lëtzebuerg
Malta
Nederland
Norge
Polska
Portugal
España
Suisse
Suomi
Sverige

Getting Started with XR Interaction Toolkit and Wave

What will you learn?

You will learn how to integrate the XR Interaction Toolkit with your Wave project.

Note: In this tutorial we will use Unity 2021.3.9f1 and VIVE Devices.

Setup Project

Download the Vive Wave XR Plugin here.

Setup controller interactions with Unity’s XR Interaction Toolkit

  1. In Package Manager, install Unity’s XR Interaction Toolkit from Unity registry.


  2. Click Yes on the new input system warning message prompt.


  3. In Package Manager, import the Starter Assets sample into the project.


  4. You can use a custom XR Rig, the Wave Rig or the XR Rig that’s provided with the XR Interaction Toolkit. In this tutorial, we will use the XR Rig provided by the toolkit. Right-click in the Hierarchy window and select XR > XR Origin (VR).


  5. You will see the XR Origin (XR Rig) gameobject is added to the Hierarchy window, as well as the XR Interaction Manager gameobject.


  6. Set the Tracking Origin Mode to Floor on the XR Origin gameobject.


  7. Select the Right Controller gameobject under XR Origin (XR) > Camera Offset. On the XR Controller (Action-based) script, click the Preset selector (the slider icon) at the top-right of the component in the Inspector window. Select the XRI Default Right Controller preset. You should see all the references in the XR Controller script should now be updated.






  8. Select the Left Controller gameobject under XR Origin (XR) > Camera Offset. On the XR Controller (Action based) script, click the Preset select (the slider icon) at the top-right of the component in the Inspector window. Select the XRI Default Left Controller preset.

  9. On the XR Controller Action script for each controller, delete the reference for Model Prefab.


  10. You can also delete the EventSystem gameobject from the Hierarchy window. Right-click in the Hierarchy and select XR > UI Event System.


  11. Select the new EventSystem gameobject. On the XR UI Input module script, update the Input System UI Actions references.


  12. Add a sphere to the scene. Set the position to 0, 1, 1. Set the scale to the .25, .25, .25. Create a red material and add it to the sphere.


  13. Add an XR Grab Interactable script to the sphere.


  14. Add a 3D plane gameobject to the scene for the ball to rest on. Build and deploy the apk to the headset. At this point, the headset is being tracked, the controllers are being tracked and you should be able to pick up the sphere using the grab button.

  15. To grab objects when they are close, you can add a Direct Interactor gameobject to each controller. In the Hierarchy, right-click on the Right Controller and select XR > Direct Interactor (Action-based). Do the same for the Left Controller.


  16. Select the Direct Interactor gameobject on the Right Controller and remove the XR Controller (Action-based) script from it because the parent gameobject already has that script. Update the Interaction Manager reference. Remove XR Controller (Action-based) script from the Left Controller and update the Interaction Manager reference. Build and deploy the apk.