W14 | Setting up Hand Tracking in VR platform
- Soo Zhi Jing
- Sep 12, 2020
- 2 min read
Before even starting to draft out the detailed animatics, I experimented with the VR headset and successfully linked the VR headset to the platform I will be using to create my project, which is with Unity. As I got familiar with the VR platform, I could not proceed unless I had a Background to work with. After finishing the 3D model of the Office scene, I used it to start testing the basic mechanism of the project such as the hand tracking.
I seek for help from a lecturer that is more knowledgeable in this area which was MinKen as I was having some difficulties setting it up through online tutorials. A lot of tutorials used the "oculus integration" tool to enable the hand tracking function that can be downloaded for free in Unity Store which I successfully imported in and worked. However, when I moved on to attempting to code the motion where users can highlight objects when the hand is hovered to it, for some reason it did not work. The debugging process was never ending and it was hard for me to understand the reason behind the error hence I looked for Minken to help out. Instead of using the "Oculus Integration" fully, he taught me how to code it manually and to my surprise it was not as complicated as expected. The idea was similar to the "RayCast" we learned in class in previous semesters but instead this was a "Line Cast" instead. RayCast was used as the line of view to highlight something instead the "line cast" was used in a way that an invisible line was attached to the hand and wherever the line hit on the object, the object will light a different colour.

The gif above shows the hand tracking motion is successfully enabled

(The photo above shows a screenshot of the working file in Unity Engine)


(The photo above shows the codes for the line cast and trigger)
Final Result of the Prototype
The prototype showcases that when hands hover to the boxes, it will change colour in a VR environment.
Comments