Adding a Pickup-enabled object
A pickup-enabled object can be picked up by the end user, thrown, or put down again.
To add a pickup-enabled object:
- Import the FBX file of your asset. Click Assets > Import New Asset , navigate to your asset, and click Import .
- Repeat to import textures and audio.
- Drag and place the object from the project window.
- Create and assign material, or use the standard.
- Drag textures to the object(s).
-
With your object selected, click
Add Component
in the Inspector window. Add all of the following components:
- A collider of your choice. If you choose a mesh collider, make sure to specify the mesh it applies to. Keep in mind complex or extremely smooth meshes may have unpredictable results.
- Rigid Body . For pickup-enabled objects, make sure Kinematic is cleared.
- Vive Object Props (Script) . Select Pick Up Item for a pickup-enabled object.
Important : Make sure that the Vive Object Props (Script) component is at the top of the object’s hierarchy, above any meshes.
- You can add audio to the corresponding slot, which will play when that action occurs.
- Make sure to test your objects, either through Unity or through exporting.
The VIVEPORT Scene SDK includes the Pickup Cube prefab with all of these enabled. It uses the following components: Box Collider , Rigidbody , and Vive Object Props (Script) .