This blog is the continuation of the previous one where we've learned about adding hand interactors and adding interactable objects that can be manipulated using just one hand or two hands. We also learned how to add physics to those objects. If you haven’t checked out the first two parts of this series, we highly recommend checking them out.
In this blog, we’ll learn about two more things. To create an object that can be rotated about an axis and to record and use hand poses.
Let’s see how to create an object that has a rotational type of interaction like opening a door or opening a treasure chest.
Now you can press play to test the scene. You will be able to rotate the door on either side by 45 deg.
With that, we have created objects that can be rotated about an axis. Next, let’s see how to record hand poses and grab the object using those recorded poses.
By default, there are only two ways of grabbing an object, one is by pinch and the other is by making a fist. These types of grab interactions might work for simple 3D objects. But when there are complex objects like mugs, bottles, phones, etc. pinching to grab them looks unnatural. So what’s the best way to do it? By recording hand poses. We can record all the possible ways in which an object can be grabbed and when the user grabs it, the closest hand pose point gets detected and the recorded pose is seen. Also to make things clear, we still have to pinch to grab but in VR the recorded pose is seen. So let’s see how that’s done.
With that we have created a grab interaction with recorded poses.
In this series, we have learned all the ways to grab an object, manipulate its transform, manipulate its size, and throw it using physics components. We also learned to create a rotational type of interaction and record the hand pose for complex objects. In the next blog, we’ll see how we can use the poke interaction to press VR buttons and interact with the UI.
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.