Made With Unity | Unity VR Part 4: VR Hands
Lets add some hands to VR Player using the Oculus free hands model and get some basic animation rolling😆
OCULUS FREE HAND MODEL
Getting The Hand Models
Using Unity Asset Store or the Package Manager window, find the Oculus Integration SDK
Download only the CustomHands folder and the TouchControllers folder. Once done, erase the Scripts folder to remove some errors you will encounter.
USING VR HAND ON UNITY
Basic Hand Animations
Find the Models folder to get a simple hand, drag the l_hand_skeletal_lowres (this is the left hand) object to the Hierarchy; add the LeftHandAnimator controller to the Animator component of the hand.
Create a new script, named it VRHands and add it to the l_hand_skeletal_lowres as a component, take a note to add the namespace using UnityEngine.XR.Interaction.Toolkit on top of your script. Change the Transform values just like the one on the image.
Give a shoutout and a BIG thanks to David Brown for the simple script to use on the VR Hands👏
Drag the hand to your designated Prefabs folder and repeat the same steps for the Right Hand, note the difference in the Z rotation for the Right Hand.
Changing VR Hands Color
Create a new material with the color of your choosing, open the Hands prefab and find the object that hold the Skimmed Mesh Renderer and place the material into the Materials Element 0
Adding Hand To Your XR Player
Go to your XR Player, find your LeftHand Controller / RightHand Controller, on your XR Controller (Action-based) script component add the hands prefab to the Model Prefab field and on the XR Direct Interactor component make sure the Hide Controller On Select is check, this will allowed your hands to disappeared when picking up object.
Filebase is the ultimate game asset plugin built by GameDevHQ to help you build video games quickly and easily. No need to spend thousands of dollars purchasing asset packs varying in quality or styles. It provide a library of high-quality assets that are consistent and optimized for real-time game play. Easy one-click imports through our plugin allow you to construct an entire game level in no time at all.
On Filebase they have 10 ready VR hands rigged with animation as part of there assets. They work similar has the Oculus hands.
Download the hands to your Unity project, find the Hands prefab and add them to the Model Prefab field of your XR Player LeftHandController, same steps we did for the Oculus hands.
On the prefab Hands Left / Right, add the VR Hands script component, make the necessary edits on the Transform and use the same LeftHandAnimator controller from the Oculus folder on the Controller field.
🎮PART 5 🎮