Determine the Grab Attach Point

Create a More Realistic Grab Attach Point on the Basketball

Jordan T Kay
3 min readApr 23, 2024

Although we can grab our basketballs, when we do, the basketball’s pivot point is snapped to our hands, which is directly in the center of the ball. I think we can all agree that this does not look right…

How can we fix this? Well, thanks to the XR INTERACTION TOOLKIT and its included component XR GRAB INTERACTABLE we can fix this by simply configuring the the XR Grab Interactable Component.

Enabling the Use Dynamic Attach setting on the XR Grab Interactable component allows the attachment point to adjust based on the Interactor’s (user’s controller) pose at the time of selection. By enabling this, it also allows for some other configurations as well…

MATCH POSITION → the attachment point’s position will be set to align with the Interactor’s position at the start of the grab

The attachment point of our player’s virtual hand and the basketball will match the position of the player’s virtual hand at the moment of the grab.

← — — —— —← — — — — — — ENABLED | DISABLED — — — — — — → —— — — — →

MATCH ROTATION → the attachment point’s rotation will be set to align with the Interactor’s position at the start of the grab

The attachment point’s rotation of our player’s virtual hand and the basketball will match the rotation of the player’s virtual hand at the moment of the grab.

← — — — — — ← — — — — — — ENABLED | DISABLED — — — — — — → — — — — — →

SNAP TO COLLIDER VOLUME → Adjust the dynamic attachment point to keep it on or inside the Colliders that make up this object

Ensures the grab point is on the basketballs collider, making it so our virtual hand is attaching to a point ON the ball, not INSIDE the ball.

← — — — — — ← — — — — — — ENABLED | DISABLED — — — — — — → — — — — — →

TEST

--

--

Jordan T Kay

Join my journey into game development with Unity. Learning all I can to produce quality games. 🚀