VR with Andrew's Interactions Tutorial: https://www.youtube.com/watch?v=PnnHx-DVDLE
Basic Steps:
1. Set up an XR Rig (explained in Module 1: Setting up the XR Interaction Toolkit).
2. Create a Plane primitive object for the ground.
3. Create a Cube primitive object as the object you will interact with.
4. Add the "XR Grab Interactable" component to the Cube.
5. Remove the "XR Ray Interactor," "Line Renderer," and "XR Interactor Line Visual" components from the LeftHand and RightHand Controllers (found under XR Rig -> Camera Offset in the Hierarchy Window).
6. Add the "XR Direct Interactor" component to the LeftHand and RightHand Controllers.
7. Add a Sphere Collider component to the LeftHand and RightHand Controllers.
8. Check the "Is Trigger" option of the Sphere Colliders.
9. Create a Sphere primitive object as a Child object of the LeftHand and RightHand Controllers to create hand references for the controllers.
* Note: You can use any 3D model as a hand reference, simply by making it the Child of a hand controller. Andrew (from VR with Andrew) provides free hand model .fbx files here: https://github.com/C-Through/VR-Button/tree/master/Assets/Meshes
10. When you enter Play Mode, you should be able to pick up the cube, switch which hand is holding it, and drop it using whatever button is set as the "Select Usage" parameter in your LeftHand and RightHand Controller objects' "XR Controller" components (set to the "Grip" by default).
Back to Top