Getting a Handle on Things

Timothy Janssen
2 min readMay 8, 2024

--

I will be covering Socket Interactors in VR. First, I am going to make a file cabinet that has a drawer the player will need to open. To get this working correctly I will need to get some joints working. This way the the drawer will open and close like a real drawer.

There are many different types of joints in Unity. The drawer will be connected to the cabinet with a Configurable Joint. This is the most elaborate joint so I will not cover it here.

To start I need to add a joint to the handle of the drawer. I will start by adding a collider and adjusting the size to fit around the handle.

Now I will add the joint. I will be using a Fixed Joint to attach the handle collider to the drawer. I also need to assign the drawer as the connected body.

The next step is to add the XR Grab Interactable component and then set the Movement Type to Velocity Tracking. In addition, I will enable smooth position and disable Track Rotation.

It's time to see how it works.

To see what happens if it is not set up properly you can get some unexpended results.

Now it is your turn to get out there and be sure to test it out to make sure you get the results you are looking for!!!!

--

--