SDK Buttons

Introduction

VIVE Wave™ supports buttons listed below:

  • Menu
  • Grip
  • DPad Left
  • DPad Up
  • DPad Right
  • DPad Down
  • Volume Up
  • Volume Down
  • A (X)
  • B (B)
  • Touchpad
  • Trigger
  • Thumbstick

Note: We recommend to call API

bool UWaveVRInputFunctionLibrary::IsInputButtonPressed(EWVR_DeviceType device, EWVR_InputId button_id)

to check if a button is available.

WaveVR Button State (Pressed, Unpressed, Touched and Untouched)

Blueprint

In Blueprint, there are APIs can be used to get buttons’ press / touch states.

The buttons are define in WaveVRBlueprintFunctionLibrary.h

UENUM(BlueprintType)
enum class EWVR_InputId : uint8
{
        NoUse = WVR_InputId::WVR_InputId_Alias1_System,
        Menu = WVR_InputId::WVR_InputId_Alias1_Menu,
        Grip = WVR_InputId::WVR_InputId_Alias1_Grip,
        DPad_Left = WVR_InputId::WVR_InputId_Alias1_DPad_Left,
        DPad_Up = WVR_InputId::WVR_InputId_Alias1_DPad_Up,
        DPad_Right = WVR_InputId::WVR_InputId_Alias1_DPad_Right,
        DPad_Down = WVR_InputId::WVR_InputId_Alias1_DPad_Down,
        Volume_Up = WVR_InputId::WVR_InputId_Alias1_Volume_Up,
        Volume_Down = WVR_InputId::WVR_InputId_Alias1_Volume_Down,
        Bumper = WVR_InputId::WVR_InputId_Alias1_Bumper,
        A_X = WVR_InputId::WVR_InputId_Alias1_A,
        B_Y = WVR_InputId::WVR_InputId_Alias1_B,
        Back = WVR_InputId::WVR_InputId_Alias1_Back,
        Enter = WVR_InputId::WVR_InputId_Alias1_Enter,
        Touchpad = WVR_InputId::WVR_InputId_Alias1_Touchpad,
        Trigger = WVR_InputId::WVR_InputId_Alias1_Trigger,
        Thumbstick = WVR_InputId::WVR_InputId_Alias1_Thumbstick,

Right-click in Blueprint Event Graph and type WaveVR to see APIs under subtitle:

  • Input
../_images/Unreal_WaveVR_Input_BlueprintFunctionLibrary.png

The API IsInputButtonPressed, IsInputButtonTouched and GetInputButtonAxis of subtitle Input support left-handed mode.

../_images/UnrealControllerButtons_IsInputButtonPressed.png

Developer can see available Button Id but the Power / System key is NOT in the list (unavailable).

C++

In C++, you can write code like:

UWaveVRInputFunctionLibrary::IsInputButtonPressed(EWVR_DeviceType device, EWVR_InputId button_id)

to get states of specified button_id of device.

Unreal Input Plugin (For 4.23 and before)

Unreal provides the Input engine for you to get buttons’ states. VIVE Wave™ defines plugin keys in the Input engine.

In Settings -> Project Settings -> Engine/Input, you can see the Action & Axis button definitions.

../_images/Unreal_WaveVR_Plugin_ActionMappings.png ../_images/Unreal_WaveVR_Plugin_AxisMappings.png

In C++ code (e.g. Pawn), you can listen to button’s state in SetupPlayerInputComponent:

PlayerInputComponent->BindAction("TouchpadPress_Right", IE_Pressed, this, <your function reference>);
PlayerInputComponent->BindAction("TouchpadPress_Right", IE_Released, this, <your function reference>);

In Blueprint, you should Enable Input:

../_images/Unreal_WaveVR_EnableInput.png

Then adding key(s) by right-click -> type Input Action -> select event (e.g. TouchpadPress_Right):

../_images/Unreal_WaveVR_InputAction.png ../_images/Unreal_WaveVR_Input_TouchpadPress_Right.png

Unreal Input Plugin (For 4.24 and after)

Due to Unreal does NOT support MotionController anymore after version 4.24, we provide the Wave input for the button usage.

In Settings -> Project Settings -> Engine/Input, you can see the Wave category when specifying button.

../_images/UnrealControllerButtons01.png ../_images/UnrealControllerButtons02.png