Panel Menu Controller
Overview
Purpose: top-level controller class to handle the display of up to four child PanelMenuItemController items which are displayed as a canvas UI panel.
This script should be attached to a VRTK_InteractableObject > first child GameObject [PanelMenuController].
The [PanelMenuController] must have a child GameObject [panel items container].
The [panel items container] must have a Canvas component.
A [panel items container] can have up to four child GameObject, each of these contains the UI for a panel that can be displayed by [PanelMenuController].
They also have the [PanelMenuItemController] script attached to them. The [PanelMenuItemController] script intercepts the controller events sent from this [PanelMenuController] and passes them onto additional custom event subscriber scripts, which then carry out the required custom UI actions.
To show / hide a UI panel, you must first pick up the VRTK_InteractableObject and then by pressing the touchpad top/bottom/left/right you can open/close the child UI panel that has been assigned via the Unity Editor panel. Button type UI actions are handled by a trigger press when the panel is open.
Inspector Parameters
- Rotate Towards: The GameObject the panel should rotate towards, which is the Camera (eye) by default.
- Zoom Scale Multiplier: The scale multiplier, which relates to the scale of parent interactable object.
- Top Panel Menu Item Controller: The top PanelMenuItemController, which is triggered by pressing up on the controller touchpad.
- Bottom Panel Menu Item Controller: The bottom PanelMenuItemController, which is triggered by pressing down on the controller touchpad.
- Left Panel Menu Item Controller: The left PanelMenuItemController, which is triggered by pressing left on the controller touchpad.
- Right Panel Menu Item Controller: The right PanelMenuItemController, which is triggered by pressing right on the controller touchpad.
Example
040_Controls_Panel_Menu
contains three basic interactive object examples of the PanelMenu in use.
Updated less than a minute ago