Basic Interactable Objects

Basic setup of using controllers to be able to pick up and interact with objects

XR Ray Interactor Setup

Navigate to the Left Hand Controller in the Hierarchy

Find the XR Ray Interactor component in the Inspector

  • If there isn't an XR Ray Interactor component, add one

Within XR Ray Interactor component

  • Disable Anchor Control

  • Enable Hide Controller on Select

Do the same for Right Hand Controller

Making Objects Grabable

  1. Add the XR Grab Interactable component to your object

    • Note: This will automatically add a Rigidbody component as well

  2. In your Rigidbody component:

    • Select Continuous Dynamic for your collision detection method

  3. In your XR Grab Interactable component:

    • Set your movement type to Kinematic

    • Check on Smooth Position

    • Check on Smooth Rotation

  4. (Optional) Add a specific Attach point to Model

    1. Make an empty game object named β€œAttach” as a child of the grabable object.

    2. Transform the Attach game object to the correct orientation using the transform tools

    3. In the XR Grab Interactable component of your object locate the Attach Transform property.

  5. Drag and drop your new Attach object to assign it to the Attach Transform property.

Last updated