Setting up Grabbable VR Objects
Jul 12, 2024
My hands can can make grasping motions, so now to make sure they have things to grab. In this case, a basketball.
To do this, I needed to incorporate three things into the basketball object:
- Sphere Collider — So that it can collide with the colliders in the hand prefabs to trigger and interaction
- Rigidbody — So that the basketball has a presence within the scene
- XR Grab Interactable — XR Toolkit to the rescue again with a prebuilt Grab Interactable script to let this happen
Simple as that (for now) we have a grabbable interactable. As you can see, it’s not perfect, so there’s some tweaking to do. But at least the basic action is there.