WaveVR_AutoLayout

WaveVR_AutoLayout is an extension of WaveVR_ShowIndicator, it is used to display controller tips for each button. WaveVR_AutoLayout is dependent on WaveVR_RenderModel.cs, and all the devices must follow the WaveVR rules.

Preconditions

One of the preconditions should be met:

  1. Using a controller loader.
  2. If a customized controller is used, please make sure each component mesh in the controller model must follow the naming rule defined by WaveVR. Please refer to the OEM Customization Guide for more details.

Note

WaveVR_ShowIndicator and WaveVR_AutoLayout can be used independently when you add component to a controller model. However, WaveVR_AutoLayout will be disabled if both two components WaveVR_ShowIndicator and WaveVR_AutoLayout are added to the controller model and the option Auto Layout in WaveVR_ShowIndicator is unchecked.

Introduction

_images/AutoLayout1.png

Indicator feature

  • Show Indicator
The default value of Show Indicator is disable. Check Show Indicator if you want to use WaveVR_AutoLayout.
  • Show Indicator Angle
The pitch angle of the controller to show all the controller tips. For instance, controller tips will be shown when the pitch angle is greater than 30 degrees, and be hidden otherwise.
  • Hide Indicator By Roll
Check Hide Indicator By Roll if you want to hide controller tips when the roll angle of the controller is greater than 90 degrees.
  • Based On Emitter
Check Based On Emitter if you want to base indicator on the emitter.
  • Display Plane

Choose which plane to display the indicator and how to arrange the layout, the options is as follows:

  • Button_Auto

    Set the y component of the position relative to the button, and set the z component of the position by automatic arrangement.

  • Button

    Set both the y and z component of the position relative to the button.

  • Body_Up

    Set the y component of the position relative to the uppermost button, and set the z component of the position by automatic arrangement.

  • Body_Middle

    Set the y component of the position relative to the body, and set the z component of the position by automatic arrangement.

  • Body_Bottom

    Set the y component of the position relative to the lowermost button, and set the z component of the position by automatic arrangement.

Line customization

  • Line Start Width
The starting width of the indicator line. It ranges from 0.0001f to 0.1f.
  • Line End Width
The ending width of the indicator line. It ranges from 0.0001f to 0.1f.
  • Line Color
The color of the indicator line.

Text customization

  • Text Character Size
The non-Chinese text character size of the indicator. It ranges from 0.01f to 0.2f.
  • Zh Character Size
The Chinese text character size of the indicator. It ranges from 0.01f to 0.2f.
  • Text Font Size
The text font size of the indicator. It ranges from 50 to 200.
  • Text Color
The color of the indicator.

Indications

Button Indication List

A list to customize indicator settings for each button.
  • Size
The number of buttons to show indicator.

Element

  • Key Type

WaveVR_AutoLayout supports the following buttons:

  • Trigger
  • Touch Pad
  • Digital Trigger
  • App
  • Home
  • Volume
  • Volume Up
  • Volume Down
  • Grip
  • D Pad_Left
  • D Pad_Right
  • D Pad_Up
  • D Pad_Down
  • Alignment

WaveVR_AutoLayout sorts all the buttons by the z component relative to the controller body, and also follows the rules below to arrange the alignment by the x component relative to the controller body:

  1. Relatvie to the controller body, set the alignment to the left if the button is on the left, set the alignment to the right if the button is on the right.
  2. Relatvie to the controller body, you can choose the options below if the button is in the middle.
  • Balance
  • Right
  • Left

Follow the rule 1, you can’t set the alignment to right if the button is on the left, and vice versa.

If Balance is chosen, WaveVR_AutoLayout will automatically arrange the layout follow the rule 3.

  1. To keep the number of the indicators on the left and on the right balance, according to the z component relative to the controller body, WaveVR_AutoLayout will automatically arrange the alignment if the button is set as Balance.

Note

The number of the indicators on the left and right may not be balanced due to developers’ perferences or the number of the buttons.

  • Distance Between Button And Text
Distance between the button and the indicator text. It ranges from 0.0f to 0.1f.
  • Distance Between Button And Line
Distance between the button and the start of the indicator line. It ranges from 0.0f to 0.1f.
  • Line Length Adjustment
The length of the indicator line is the distance between the button and the indicator text. You can adjust the line length by this value, and it ranges from -0.1f to 0.1f.
  • Use Multi Language
Check Use Multi Language if you want to display indicator text with locale language. Please refer to WaveVR_Resource for more details about multi-language.
  • Indication Text

If Use Multi Language is checked, you can type in “system” to query the resource for a defined name, or type in a customized name to query a resource.

If Use Multi Language isn’t checked, you can type in “system” to display the content of Key Type defined by the system, or type in a customized name as an indicator text.

Resources

The script WaveVR_AutoLayout.cs is located in Assets/WaveVR/Scripts/ControllerModel/.