Interactive VR Hands

Laila Gamaleldin

February 2021

Thus tutorial guides you through how to set up a basic plain in Unity VR along with interactive hands that follow those of the user and mimic their movement. The end product should look as follows:


video-1613635023.mp4

Requirements:

  • Either a Windows machine or a Windows virtual machine (like Paperspace)

  • Virtual Desktop (follow step 2 of this guide for set-up instructions)

  • Unity

  • Oculus Quest 2


Note: This tutorial is based largely on the video 'How to Make a VR Multiplayer Gama - Part 1' by the YouTuber Valem. It does not follow the tutorial verbatim, however.


Steps:

  • Open Unity Hub

  • Click the down arrow next to the button that reads 'New' and pick version 2019.4.19f1

    • If you are operating a later version of Unity, the instructions in this video may prove more relevant

  • Name your project and make sure to choose a 3D template before clicking 'Create'

  • Go to Window > Package Manager

  • Select the dropdown menu that reads advanced, and from there pick 'Show preview packages'


  • Scroll down to 'XR Interaction Toolkit' and click Install

    • Note: your project may potentially restart after this step, depending on your input system

  • Exit the Package Manager and go to Edit > Project Settings > Player

  • Under 'XR Settings', check off 'Virtual Reality Supported'

    • Make sure to also include all of the headset types you want to support



  • In Project Settings still, click on 'XR Plugin Management' and click install

    • Similarly, check off the boxes relevant to the headset(s) you'd like to support

Note: if you get a pop-up that looks like this, click Ok

  • Right-click the Main Camera, go under XR, and select 'Room-scale XR Rig (Action-based)'

    • At this point, your hierarchy should look as follows:

  • Click on both the RightHand and LeftHand Controllers

  • In the Inspector toolbar, remove the XR Rig Interactor, then the XR Interactor Line Visual, and then the Line Renderer

    • The order of the final two matters, you will run into an error if you do it the other way around

    • To delete a component, right click the title and then select 'Remove Component'

  • Right-click the hierarchy toolbar, select 3D Object, then Plane