Wave Tracker Interface

Refer to Wave XR Plugin Packages about VIVE Wave™ XR plugin packages.

The Essence package provides the Wave.Essence.Tracker.TrackerManager interface to access the Tracker data.

Wave Tracker Class Reference

XRSDK package: Wave.OpenXR, Wave.XR.Settings

Native package: Wave.Native

Essence package: Wave.Essence.Events

Wave Tracker Public Types

To access the Wave Tracker, you have to import the Essence package and use the Wave.Essence.Tracker namespace.

TrackerStatus

public enum TrackerStatus
{
    // Initial, can call Start API in this state.
    NotStart = 0,
    StartFailure,

    // Processing, should NOT call API in this state.
    Starting,
    Stopping,

    // Running, can call Stop API in this state.
    Available,

    // Do nothing.
    NoSupport
}

TrackerId

public enum TrackerId
{
    Tracker0 = WVR_TrackerId.WVR_TrackerId_0,
    Tracker1 = WVR_TrackerId.WVR_TrackerId_1,
    Tracker2 = WVR_TrackerId.WVR_TrackerId_2,
    Tracker3 = WVR_TrackerId.WVR_TrackerId_3,
    Tracker4 = WVR_TrackerId.WVR_TrackerId_4,
    Tracker5 = WVR_TrackerId.WVR_TrackerId_5,
    Tracker6 = WVR_TrackerId.WVR_TrackerId_6,
    Tracker7 = WVR_TrackerId.WVR_TrackerId_7,
    Tracker8 = WVR_TrackerId.WVR_TrackerId_8,
    Tracker9 = WVR_TrackerId.WVR_TrackerId_9,
    Tracker10 = WVR_TrackerId.WVR_TrackerId_10,
    Tracker11 = WVR_TrackerId.WVR_TrackerId_11,
    Tracker12 = WVR_TrackerId.WVR_TrackerId_12,
    Tracker13 = WVR_TrackerId.WVR_TrackerId_13,
    Tracker14 = WVR_TrackerId.WVR_TrackerId_14,
    Tracker15 = WVR_TrackerId.WVR_TrackerId_15,
}

TrackerRole

public enum TrackerRole
{
    Undefined   = WVR_TrackerRole.WVR_TrackerRole_Undefined,
    Standalone  = WVR_TrackerRole.WVR_TrackerRole_Standalone,
    Pair1_Right = WVR_TrackerRole.WVR_TrackerRole_Pair1_Right,
    Pair1_Left  = WVR_TrackerRole.WVR_TrackerRole_Pair1_Left,

    Shoulder_Right = WVR_TrackerRole.WVR_TrackerRole_Shoulder_Right, // 32
    Upper_Arm_Right = WVR_TrackerRole.WVR_TrackerRole_Upper_Arm_Right, // 33
    Elbow_Right = WVR_TrackerRole.WVR_TrackerRole_Elbow_Right, // 34
    Forearm_Right   = WVR_TrackerRole.WVR_TrackerRole_Forearm_Right, // 35
    Wrist_Right     = WVR_TrackerRole.WVR_TrackerRole_Wrist_Right, // 36
    Hand_Right = WVR_TrackerRole.WVR_TrackerRole_Hand_Right, // 37
    Thigh_Right     = WVR_TrackerRole.WVR_TrackerRole_Thigh_Right, // 38
    Knee_Right = WVR_TrackerRole.WVR_TrackerRole_Knee_Right, // 39
    Calf_Right      = WVR_TrackerRole.WVR_TrackerRole_Calf_Right, // 40
    Ankle_Right     = WVR_TrackerRole.WVR_TrackerRole_Ankle_Right, // 41
    Foot_Right = WVR_TrackerRole.WVR_TrackerRole_Foot_Right, // 42

    Shoulder_Left = WVR_TrackerRole.WVR_TrackerRole_Shoulder_Left, // 47
    Upper_Arm_Left  = WVR_TrackerRole.WVR_TrackerRole_Upper_Arm_Left, // 48
    Elbow_Left = WVR_TrackerRole.WVR_TrackerRole_Elbow_Left, // 49
    Forearm_Left    = WVR_TrackerRole.WVR_TrackerRole_Forearm_Left, // 50
    Wrist_Left      = WVR_TrackerRole.WVR_TrackerRole_Wrist_Left, // 51
    Hand_Left = WVR_TrackerRole.WVR_TrackerRole_Hand_Left, // 52
    Thigh_Left      = WVR_TrackerRole.WVR_TrackerRole_Thigh_Left, // 53
    Knee_Left = WVR_TrackerRole.WVR_TrackerRole_Knee_Left, // 54
    Calf_Left       = WVR_TrackerRole.WVR_TrackerRole_Calf_Left, // 55
    Ankle_Left      = WVR_TrackerRole.WVR_TrackerRole_Ankle_Left, // 56
    Foot_Left = WVR_TrackerRole.WVR_TrackerRole_Foot_Left, // 57

    Chest = WVR_TrackerRole.WVR_TrackerRole_Chest, // 62
    Waist = WVR_TrackerRole.WVR_TrackerRole_Waist, // 63

    Camera = WVR_TrackerRole.WVR_TrackerRole_Camera, // 71
    Keyboard = WVR_TrackerRole.WVR_TrackerRole_Keyboard, // 72
}

TrackerButton

public enum TrackerButton
{
    System = WVR_InputId.WVR_InputId_0,
    Menu = WVR_InputId.WVR_InputId_Alias1_Menu,
    A = WVR_InputId.WVR_InputId_Alias1_A,
    B = WVR_InputId.WVR_InputId_Alias1_B,
    X = WVR_InputId.WVR_InputId_Alias1_X,
    Y = WVR_InputId.WVR_InputId_Alias1_Y,
    Trigger = WVR_InputId.WVR_InputId_Alias1_Trigger,
}

Note

Only the Menu/A/X are supported now.

AxisType

public enum AxisType
{
    None = WVR_AnalogType.WVR_AnalogType_None,
    XY = WVR_AnalogType.WVR_AnalogType_2D,
    XOnly = WVR_AnalogType.WVR_AnalogType_1D,
}

Wave Tracker Manager Public Memeber Functions

The TrackerManager class provides API to access the Wave Tracker data.

To use the TrackerManager, add the TrackerManager component from the menu item Wave > GameObject > Add Tracker Manager.

StartTracker

Activates the Tracker component.

void StartTracker()

StopTracker

Deactivates the Tracker component.

void StopTracker()

GetTrackerStatus

Retrieves current Tracker component status.

TrackerStatus GetTrackerStatus()

IsTrackerConnected

Checks if a Tracker is connected.

bool IsTrackerConnected(TrackerId trackerId)

GetTrackerRole

Retrieves a Tracker’s role.

TrackerRole GetTrackerRole(TrackerId trackerId)

GetTrackerPosition

Retrieves a Tracker’s position if the pose is valid.

bool GetTrackerPosition(TrackerId trackerId, out Vector3 position) // Return true for valid pose.

GetTrackerRotation

Retrieves a Tracker’s rotation if the pose is valid.

bool GetTrackerRotation(TrackerId trackerId, out Quaternion rotation) // Return true for valid pose.

GetTrackerButtonAxisType

Retrieves the axis type of a Tracker’s button.

AxisType GetTrackerButtonAxisType(TrackerId trackerId, TrackerButton id)

TrackerButtonPress

Checks if a Tracker’s button state is changed from released to pressed.

bool TrackerButtonPress(TrackerId trackerId, TrackerButton id)

// Sample code: checks the Tracker0 button A state
if (TrackerManager.Instance != null &&
TrackerManager.Instance.TrackerButtonPress(TrackerId.Tracker0, TrackerButton.A))
{
    Debug.Log("Tracker0's button A is pressed down at current frame.");
}

TrackerButtonHold

Checks if a Tracker’s button is pressed now.

bool TrackerButtonHold(TrackerId trackerId, TrackerButton id)

TrackerButtonRelease

Checks if a Tracker’s button state is changed from pressed to released.

bool TrackerButtonRelease(TrackerId trackerId, TrackerButton id)

TrackerButtonTouch

Checks if a Tracker’s button state is changed from released to touched.

bool TrackerButtonTouch(TrackerId trackerId, TrackerButton id)

TrackerButtonTouching

Checks if a Tracker’s button is touched now.

bool TrackerButtonTouching(TrackerId trackerId, TrackerButton id)

TrackerButtonUntouch

Checks if a Tracker’s button state is changed from touched to released.

bool TrackerButtonUntouch(TrackerId trackerId, TrackerButton id)

TrackerButtonAxis

Retrieves a Tracker’s button axis. Note: You can ignore the Vector2.y if the button has Axis1D only.

Vector2 TrackerButtonAxis(TrackerId trackerId, TrackerButton id)

GetTrackerBatteryLife

Retrieves a Tracker’s battery life in float (0~1) which 1 is for 100% and 0 is for 0%.

float GetTrackerBatteryLife(TrackerId trackerId)

GetTrackerExtData

Retrieves a Tracker’s extended data present as an integer array.

Int32[] GetTrackerExtData(TrackerId trackerId)

GetTrackerExtData with timestamp

Retrieves a Tracker’s extended data present as an integer array.

Int32[] GetTrackerExtData(TrackerId trackerId, out UInt64 timestamp)

GetTrackerDeviceName

Retrieves a Tracker’s device name.

bool GetTrackerDeviceName(TrackerId trackerId, out string trackerName)