The latest Oculus SDK comes with a hand tracking feature that enables the use of hands as an input method on Oculus Quest devices. By using simple hand gestures, such as pinch, poke, as well as pinch and hold, we can integrate hand tracking such that users can select, click, scroll, drag and drop, return, or exit in our app. We can also use these simple gestures to interact with 3D models.
Using the physical hand to interact with VR objects opens the door for many possibilities. You can create apps that are aimed at teaching communication with sign language or create a game like chess or rock paper scissors that feels more life-like.
You should also have your Unity project set up for Oculus Quest. If you are unsure how that’s done, you can read through the instruction provided in sections 4 and 5 of the Passthrough blog. In addition, you can download the base repository from here.
Once your Unity project is set up with all the required project settings and packages downloaded. We can start developing for hand interaction.
So let's begin by adding prefabs to the scene which will collectively enable us to use our hands for interaction.
Let’s begin with one hand interaction. As the name suggests, this is a type of interaction where we can use only one hand at a time to interact with an object. This can be used in cases where we want to move an object from one place to another i.e. simply drag and drop an object from one place to another. To add such a feature:
With that, we have learnt to add hand interaction to our scene and interact with a 3D game object. You can further this project and create an amazing experience. Hand interaction provides a new sense of presence and can help deliver more natural interactions. In the next part, we’ll learn about two hand interaction, enabling physics and rotational transforms.
If you've enjoyed the insights shared here, why not spread the word? Share the post with your friends and colleagues who might also find it valuable.
Your support means the world to us and helps us create more content you'll love.