Grab your Objects Using Attach Transforms!

addam davis
2 min readMay 30, 2024

Objective: Understand how Attach Transforms work and use them to grab your objects with the desired orientation!

In the last tutorial we created a compound collider for a revolver. When we grabbed the revolver, the hand didn’t really hold the revolver like you normally would.

To get a better hand position on the revolver we can use Attach Transforms. Attach Transforms are the attachment point Unity uses on the interactable. To create one, we can simply right click the parent object and create a new empty object.

Name it AttachPoint so you always know what it is. Now, when selected you will see the Gizmo you would use to manipulate it.

This gizmo will attach with the gizmo on the hand model that you are using.

To select the Attach Transform we need to open the XR Grab Interactable component on the revolver and drag in the AttachPoint.

Now, grab the revolver in VR and you examine how the hand lines up with it. This process is all trial and error, making micro changes to the AttachPoint until you hand lines up with your object exactly how you want it.

Perfect! Now you know how to use and manipulate Attach Transforms! Don’t be afraid to experiment with your and I’ll see you in the next tutorial!

--

--