Basic Hand Animations in Unity VR

Michael Lam
3 min readOct 7, 2023

--

Today I learned how to add basic hand animations in Unity VR.

Overall, I’m surprised how much less coding there is in VR at least the way I’m currently learning right now and adding animations to my game objects in VR was simple enough to do.

In my hand model prefab, I noticed in the animator component that there was a controller that at the time had nothing attached to it.

I created an animator controller in my files folder and viewed it in the animator view.

I created two new empty states: Open and Close, and put two transitions in between them so they can go back and forth

In the Open state, I added the “take 001” motion from my default hand animation file and placed it into the motion section in the component. I also did the same for the Close state.

Then, I clicked on the transitions and unchecked the box that said “Has Exit Time.” This makes it so that the states would not auto transition between each other and will check for a condition before doing so.

To add a condition, I needed to add parameters which there are none by default. I created two new parameters in the parameters tab and made one for Select and Deselect.

For the transition from Open to Close, I put the Select parameter as it’s condition. For the Close to Open transition, I put the Deselect parameter as it’s condition.

With that, the transitions and animations were all set. I added the Left Hand animator controller to the animator component in my left hand prefab.

Last thing to do was check the box for Animate Model on my Left hand controller and added the Select parameter I created to the Model Select transition and Deselect to the Model Deselect Transition.

I repeated this process for my right hand and now its all done!!!

--

--