Adding a consumable object
A consumable object disappears once the user interacts with it.
To add a consumable 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 your object from the project window.
-
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 .
- Vive Object Props (Script) .
Important : Make sure that the Vive Object Props (Script) component is at the top of the object’s hierarchy, above any meshes.
- In Vive Object Props (Script) , select Is Object Consumed to make the object disappear once interacted with.
- You can add audio to the corresponding slot, which will play when that action occurs. See Adding interactive audio for details.
Make sure to test your objects, either through Unity or through exporting.