Hand Interaction
Hand Interaction is best used with hand tracking, either through our VIVE XR Hand Tracking profile or the Unity XR Hands package. Please select one. If you plan to use Hand Interaction with the XR Interaction Toolkit , the XR Hands package is necessary. Additionally, we provide a verified compatibility chart for different versions of the XR Interaction Toolkit.
Unity | Input System | OpenXR | XR Plugin Management | XR Hands | XR Interaction Toolkit |
2021.3.16 | 1.4.4 | 1.6.0 | 4.4.0 | 1.3.0 | 2.3.1 |
2022.3.21 | 1.4.4 | 1.6.0 | 4.4.0 | 1.3.0 | 2.3.1 |
2021.3.36 | 1.7.0 | 1.9.1 | 4.4.0 | 1.5.0-pre.3 | 2.5.4 |
2022.3.21 | 1.7.0 | 1.9.1 | 4.4.0 | 1.5.0-pre.3 | 2.5.4 |
Supported Platforms and Devices
Platform | Headset |
Plugin Version for
XR_HTC_hand_interaction |
Plugin Version for
XR_EXT_hand_interaction |
|
PC | PC Streaming | Focus 3/XR Elite/Focus Vision |
OpenXR Plugin 1.8.2
or above |
|
Pure PC | Vive Cosmos |
VIVE OpenXR Plugin 2.3.0
and above |
||
Vive Pro series |
VIVE OpenXR Plugin 2.3.0
and above |
|||
AIO | Focus 3 |
VIVE OpenXR Plugin 2.0.0
and above |
VIVE OpenXR Plugin 2.5.0
and above |
|
XR Elite |
VIVE OpenXR Plugin 2.0.0
and above |
VIVE OpenXR Plugin 2.5.0
and above |
||
Focus Vision |
VIVE OpenXR Plugin 2.0.0
and above |
VIVE OpenXR Plugin 2.5.0
and above |
Specification
There are 2 extensions used for Hand Interaction: XR_HTC_hand_interaction and XR_EXT_hand_interaction.
The VIVE OpenXR plugin provides a profile under Edit > Project Settings > XR Plug-in Management > OpenXR titled VIVE XR - Interaction Group, which includes extensions related to interaction.
On Android, you can enable both XR_HTC_hand_interaction and XR_EXT_hand_interaction extensions from the VIVE XR - Interaction Group.
On Windows, you can enable only XR_HTC_hand_interaction from the VIVE XR - Interaction Group.
If you wish to use the XR_EXT_hand_interaction extension on Windows, you must use OpenXR Plugin 1.8.2 or later.
Environment Settings
- If you intend to use the XR_HTC_hand_interaction extension, make ensure that the VIVE XR Hand Tracking profile is enabled, and Vive Hand Interaction is selected in the settings under VIVE XR - Interaction Group.
- On Android, if you intend to use the XR_EXT_hand_interaction extension, make ensure that the VIVE XR Hand Tracking profile is enabled, and KHR Hand Interaction is selected in the settings under VIVE XR - Interaction Group.
- On Windows, if you intend to use the XR_EXT_hand_interaction extension, you must upgrade OpenXR Plugin to 1.8.2 or above version. Make ensure that the VIVE XR Hand Tracking profile is enabled, and Hand Interaction Profile is added to the Interaction Profiles.
- If you intend to use the XR Interaction Toolkit, please ensure that VIVE XR Hand Tracking is enabled and no need to enable the Hand Tracking Subsystem, as VIVE XR Hand Tracking also support XR Hands.
Golden Sample
Interact with Objects
Basically, the XR_HTC_hand_interaction extension provides poses (pointer and grip) and values (select and grip). The XR_EXT_hand_interaction extension provide poses (pointer, grip, pinch and poke pose) and values (select, grip and pinch). These variables can be used to determine actions such as long-distance raycasting and close-range grabbing or touching.
The direction of ray uses the “forward” of pointerPose.rotation.
As you can imagine, with the data that Hand Interaction provides, we’re able to use Raycasting to select or interact with objects in XR.
Apply in XR Interaction Toolkit
The XR Interaction Toolkit offers many fully developed interaction features, most of which are controlled using input actions. Therefore, by simply adding VIVE XR Hand Interaction to the XR Interaction Toolkit's input action settings, you can use it within the XR Interaction Toolkit's samples.
-
Please ensure that VIVE XR Hand Tracking is checked and VIVE Hand Interaction is added in the settings under Edit > Project Settings > XR Plug-in Management > OpenXR.
-
Open XRI Default Input Actions from Assets > Samples > XR Interaction Toolkit > version > Starter Assets.
-
Both XRI LeftHand and XRI RightHand, add pointer/position to Aim Position and pointer/rotation to Aim Rotation.
-
Modify these Input Actions both XRI LeftHand Interaction and XRI RightHand Interaction.
- Set Action Type to Value and Control Type to axis of Select / UI Press.
- Add selectValue to Select / UI Press and add Hold and Press in Interactions.
- Add selectValue to Select Value / UI Press Value.
-
Reorder the input paths to prevent hand tracking data from being overridden by other controller data.
-
Build and run the HandsDemoScene, which is part of the XR Interaction Toolkit's samples. You should be able to raycast, grab, and touch objects.