VR Knowledge Bits: Basic Hand Animations

Eddie Sanchez
4 min readOct 30, 2023

--

If When embarking on the intricate journey of VR development, the devil is often in the details. And what detail could be more crucial than the natural movement of hands in virtual reality? This article serves as a beacon for those ready to learn how to bring virtual hands to life with basic animation techniques.

Prerequisites:

Animation Assets at the Ready

Before we delve into the virtual cauldron of VR hand animations, make sure you have your animation assets downloaded and ready for action. Consider these assets the building blocks of your animation masterpiece — the raw materials you’ll shape into something extraordinary.

A Handy Tip: Lock Down Your Workspace

Before we roll up our sleeves, here’s a quick tip: lock your Inspector window in Unity. By clicking the “lock” icon at the top right, you can prevent the panel from switching context as you drag assets around. It’s a small step that can save you a mountain of time and frustration.

Setting the Stage with an Animation Controller

First, create an animation controller in the directory that houses your Hands Prefabs folder. Think of this as setting the stage for your hand animations. It’s where you’ll direct the movement and flow of your VR hands.

Animating the Left Hand Prefab

With the stage set, it’s time to bring in your first actor: the Left Hand prefab. Here, you’ll assign the role by dragging the animation controller into the Animator component’s “Controller” field. This step is crucial; it tells the prefab which movements to perform and when.

Defining Hand States: Open and Closed

Inside your animation controller, you’ll create two new states: “Open” and “Closed.” These are the primary poses your VR hands will assume. Adding transitions between these states allows for smooth movement, akin to a well-rehearsed scene change.

Bringing Movements to Life

The next act involves assigning specific animation clips to these states. The “Take 001” clip gives life to the “Open” state, while the “l_hand_fist_anim” defines the “Closed” state. Remember to uncheck the “Has Exit Time” option in the transitions to ensure your animations don’t miss their cues.

Step for the “Open” state
Step for the “Closed” state
Repeat this step for the “Closed” state

Cueing with Triggers

In the animation window, you’ll introduce “Select” and “Deselect” triggers. These are your cues for action, telling the VR hands when to open up to the world or close into a fist, all in real-time.

Add the “Select” condition in the inspector for the Open/Closed transition line
Add the “Deselect” condition in the inspector for the Closed/Open transition line

Integrating Animations with XR Controller

Within the XR Controller component of your left hand controller, check the “Animate Model” option to activate the animations. Then link your “Select” and “Deselect” triggers to the “Model Select Transition” and “Model Deselect Transition” fields, respectively. This ensures your virtual hands react to the controller’s inputs just like a real hand would respond to your brain’s commands.

A Copy-Paste Trick for the Right Hand

Instead of repeating all the steps for the right hand, simply duplicate the Left Hand controller, rename it to “RightHand,” and adjust the necessary animation clips. This shortcut maintains consistency across your VR hands and saves precious time.

Next Time…

With the guide complete, it’s time to breathe life into those VR hands, giving them the range of motion and realism that elevate the virtual experience. The stage is set, and the curtain rises on your next creative endeavor. May your animations be as fluid and natural as the human hands they mimic.

As we save progress on this page, keep leveling up your dev skills!

--

--

Eddie Sanchez

Game Designer/Programmer looking to craft worthwhile experiences and in the process calm my soul. It's restless...