Sitemap

Unity VR: Grab Objects Just The Way You Want

4 min readApr 30, 2025

Intro

Grabbing simple round objects in VR is straightforward: add a sphere or capsule collider and enable Dynamic Attach on the XR Grab Interactable. However, for more intricate objects where holding position is important, the XR Grab Interactables offer solutions with a few additional steps.

Multiple Colliders

This example will use a pistol. Add a box collider, move and resize it to fit the handle. But, what if you want to pick up the pistol from a different part instead of the handle?

You can create a compound collider by adding a collider to any of the child objects of the parent object that has a Rigidbody component.

So, now we have two colliders on the pistol that we can interact with; they just cannot be on the same game object. When you add an Grab Interactable component to the pistol, you can add each of the Colliders from the parent and child objects to the Collider array. This will make them act as one collider.

You will need to make sure ‘Use Dynamic Attach’ is enabled for this to work.

Attach Transform

There will be cases where you want the Grab Interactable to snap to a specific position for it to be used property-like grabbing a pistol.

You will notice, if you are not using the ‘Dynamic Attach’ and you pick up an Grab Interactable it will use the center of collider of the Grab Interactable and the attach it to the root bone of the Hand Model or center of the collider of a simple object for the controller visual.

To give a more precise attachment point, you can create an empty child object (attachPoint) as we can use its position (transform) for where you want the Grab Interactable to pick up from.

In the XR Grab Interactable component, assign the AttachPoint object to the ‘Attach Transform’ reference.

Make sure ‘Use Dynamic Attach’ is disabled so it doesn’t use the collider volume(s) of the object and uses just the Transform of the game object.

Now it doesn’t matter where you pick up this object from, it will snap to this object’s Transform.

Second Attachment

On the XR Grab Interactable the ‘Select Mode’ property determines if one or multiple Interactors can grab the object. This will need to be set to ‘Multiple’ to allow for two hand pickup.

On the object, we’ll add two empty game objects to act as the two attach points that the Grab Interactors will snap to it. Once you have those two attach points properly positioned, assign them to the Attach & Secondary Attach Transform references.

Conclusion

Handling complex grabbing interactions in VR requires more than just basic collider setup. By using multiple colliders across child objects and properly configuring the XR Grab Interactable component, you can enable more natural and flexible interaction points. Whether you want to allow dynamic grabs based on collider contact or enforce specific grab positions using an Attach Transform, Unity’s XR Interaction Toolkit provides the tools to support both approaches.

--

--

No responses yet