Picking up Objects
Last updated
Last updated
The Meta SDK comes with some tools that enable picking up assets within the experience.
The Components you add depends on if you want to interact with objects with the controllers, hands, or both.
Add an asset to the space that you want to be able to pick up.
We'll use a cube for time, but this could be any asset you like.
Add a 'Grabbable' component onto the cube.
Add 'Grab Interactable' component to the cube.
Drag the 'Grabbable' component onto the 'Pointable Element' property in the 'Grab Interactable' component.
Add a Rigidbody component to the cube if you want the cube to have physics.
Disable 'Is Kinematic' if you want the cube to drop when let go.
Drag the Rigidbody component onto the Rigidbody property on the 'Grab Interactable' component.
Add a Physics Grabbable component to the cube.
Drag the Physics Grabbable component onto the Physics Grabbable property under 'Optionals' in the Grab Interactable component.
This allows the Controllers to pick up the asset.
Add a 'Distance Grab Interactable' component to the asset if you want to be able to pick up the asset from a distance with the controllers.
This allows the Controllers to pick up the asset from a distance.
Drag the 'Grabbable' component into the Pointable Element in the 'Distance Grab Interactable' component.
Add a 'Hand Grab Interactable' component to the asset.
This allows the Hand tracking to pick up the asset.
Add a 'Distance Hand Grab Interactable' component to the asset.
This allows the Hand Tracking to pick up the asset from a distance.