Adding immobile/static objects
A static or immobile object can be interactive, but with a fixed position. It does not move other than animations or scripts that are applied to it – such as a switch that flips when touched, or a marimba that plays a note when struck.
To add a static 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.
- Vive Object Props (Script) .
Important :
-
- Do not apply a rigid body to an immobile/static object.
- 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) , add your animation to the appropriate animation slot. Animations can be created in Unity or imported as FBX.
- 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.