Guides
Guides
These docs are for v3.1.0. Click to read the latest docs for v3.3.0.

VRTK_Chest

extends VRTK_Control

Overview

Transforms a game object into a chest with a lid. The direction can be auto-detected with very high reliability or set manually.

The script will instantiate the required Rigidbody, Interactable and HingeJoint components automatically in case they do not exist yet. It will expect three distinct game objects: a body, a lid and a handle. These should be independent and not children of each other.

Inspector Parameters

  • Direction: The axis on which the chest should open. All other axis will be frozen.
  • Lid: The game object for the lid.
  • Body: The game object for the body.
  • Handle: The game object for the handle.
  • Content: The parent game object for the chest content elements.
  • Hide Content: Makes the content invisible while the chest is closed.
  • Max Angle: The maximum opening angle of the chest.

Example

VRTK/Examples/025_Controls_Overview shows a chest that can be open and closed, it also displays the current opening angle of the chest.