WaveVR_ShowIndicator is used to display controller tips of each button. It is depended on WaveVR_RenderModel.cs and all devices are followed by WaveVR rules is precondition, please refer to How to make controller model
Preconditions for showIndicator, one of them should be satisfied:
- Using controller loader.
- If customized controller wants to use showIndicator feature, please add WaveVR_RenderModel.cs to gameobject. This script based on WaveVR_RenderModel.cs to create indicator when model is ready.
This script provides customization options for the user.
Enable indicator feature, default value is disable.
Show Indicator is checked, controller loader will provide more options to developer as
Show Indicator Angle
Show indicator when controller pitch angle, default value is 30.
Hide Indicator by roll
Hide indicator if controller roll angle is more than 90. default is true.
Based On Emitter
Indicator is based on emitter, default is true.
Line length between button and indicator, default value is 0.03f and range is 0.01f - 0.1f.
Line Start Width
Starting width of line, default value is 0.0004f and range is 0.0001f - 0.1f.
Line End Width
Ending width of line, default value is 0.0004f and range is 0.0001f - 0.1f.
Line color, default value is white.
Text customization (This used textMesh of Unity):
Text Character Size
Non-chinese character size of text, default value is 0.08f，range is 0.1f - 0.2f.
Chinese Character Size
Chinese character size of text, default value is 0.07f，range is 0.1f - 0.2f.
Text Font Size
Font size of text, default value is 100f，range is 50 - 200f.
Text color, default value is white.
Developer uses a list to show button indication, each item includes
WaveVR_ControllerLoader supports button include
- Touch Pad
- Digital Trigger
- Volume Up
- Volume Down
- D Pad_Left
- D Pad_Right
- D Pad_Up
- D Pad_Down
Indication should present on which side, default value is right.
Indication default computed by origin of game object, developer might use this offset value to adjust position.
If checked, indication text will show by locale. How to use multi-language, please refer to WaveVR_Resource
Use Multi-language isn’t checked, the content used to present, developer might use keyword “system” to show content of
Key Type defined by system.
Use Multi-language is checked, the key used to query system resource, developer might use keyword “system” to query resource by defined key-name, or use custom key-name to query resource.
Follow Button Rotation
The indication follows button’s rotation, default is false.
- AdaptiveController: in Assets/WaveVR/Resources/
Script WaveVR_ShowIndicator.cs in Assets/WaveVR/Scripts/ControllerModel/