Please Select Your Location
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malta
المملكة العربية السعودية (Arabic)
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States

API Reference

ViveHandTracking

Class in Wave.OpenXR.Hand

Public Methods

GetJointLocations

Asks ViveHandTracking to try to retrieve the hand tracking data of the hand.


ViveHandTracking .GetJointLocations

Declaration

public bool GetJointLocations (bool isLeft, out XrHandJointLocationEXT [] handJointLocation)

Description

Asks ViveHandTracking to try to retrieve the hand tracking data of the hand.

GetJointLocations returns false if the tracking data is not valid; otherwise, it puts the tracking data into handJointLocation.

If isLeft is true , GetJointLocations returns the tracking data of the left hand; otherwise, it returns the tracking data of the right hand.

using UnityEngine; 
using UnityEngine.XR.OpenXR; 
using Wave.OpenXR.Hand; 
 
public class ExampleClass : MonoBehaviour {       
    void Update() {      
        XrHandJointLocationEXT[] handJointLocations = new XrHandJointLocationEXT[(int)XrHandJointEXT.XR_HAND_JOINT_MAX_ENUM_EXT];          ViveHandTracking feature = OpenXRSettings.Instance.GetFeature<ViveHandTracking>();        
        //Set the GameObject's position and rotation to the location of the tip of the left hand’s thumb.      
        if (feature && feature.GetJointLocations(true, out handJointLocations)) {      
              transform.position = new Vector3(handJointLocations[5].pose.position.x, handJointLocations[5].pose.position.y, -handJointLocations[5].pose.position.z);      
              transform.rotation = new Quaternion(handJointLocations[5].pose.orientation.x, handJointLocations[5].pose.orientation.y, -handJointLocations[5].pose.orientation.z, -handJointLocations[5].pose.orientation.w);          
        }      
    }  } 


HandTracking

Class in Wave.OpenXR.Toolkit.Hand

Static Methods

GetHandJointLocations

Returns the tracking data of the hand.


HandTracking .GetHandJointLocations

Declaration

public static HandJoint [] GetHandJointLocations(HandFlag hand)

Description

Returns the tracking data, including the position and rotation of the hand.

using System.Collections; 
using System.Collections.Generic; 
using UnityEngine; 
using Wave.OpenXR.Toolkit; 
using Wave.OpenXR.Toolkit.Hand; 
 
public class Joint_Movement : MonoBehaviour { 
     public int jointNum;   
    public bool isLeft;
    //Set the GameObject's position and rotation to the location of the hand’s joint based on Joint_Num and Is_Left      
    void Update() {      
        HandJoint joint = HandTracking.GetHandJointLocations(isLeft ? HandFlag.Left : HandFlag.Right)[jointNum];      
         if (joint.isValid) {      
              transform.localPosition = joint.position;      
              transform.rotation = joint.rotation;          
        }    
    } } 

HandFlag

Class in Wave.OpenXR.Toolkit

Declaration

public enum HandFlag

Properties

None

No hands

Left

Left hand

Right

Right hand


HandJoint

Class in Wave.OpenXR.Toolkit

Description

Holds the data of a hand joint

Properties

isValid

Tells whether the hold data is valid or not.

position

The position of the joint.

rotation

The rotation of the joint.


isValid

public bool isValid;

Description

Tells whether the hold data is valid or not.


position

public Vector3 Position;

Description

Returns the position of the joint.


rotation

public Quaternion Rotation;

Declaration

Returns the rotation of the joint.


Release Notes

1.0.1 (July 18, 2022):

Release information:

▪ Version: 1.0.1

▪ Unity Engine version: 2020.3, 2021.3

▪ Editor platform: Windows

▪ Target platform: Android ( arm64 only )

▪ Graphics API: OpenGLES3, Vulkan

▪ OpenXR Loader version: Khronos openxr_loader_for_android-1.0.23

Added features:

▪ Interaction: Hand tracking , Hand Interaction, and VIVE Wrist Tracker

1.0.0 (June 20, 2022):

Release information:

▪ Version: 1.0.0

▪ Unity Engine version: 2020.3, 2021.3

▪ Editor platform: Windows

▪ Target platform: Android ( arm64 only )

▪ Graphics API: OpenGLES3, Vulkan

▪ OpenXR Loader version: Khronos openxr_loader_for_android-1.0.20

Supported features:

▪ Basics: HMD tracking pose and XR rendering.

▪ Interaction: Controller tracking pose, key input, and haptics.

Note:

▪ Wave OpenXR plugin will insert the following data into a AndroidManifest to comply the OpenXR Android definition.

▪ Intent filter category: "org.khronos.openxr.intent.category.IMMERSIVE_HMD".

▪ User permission: "org.khronos.openxr.permission.OPENXR_SYSTEM" and "org.khronos.openxr.permission.OPENXR".