Class ViveHandInteractionExt
This UnityEngine.XR.OpenXR.Features.OpenXRInteractionFeature enables the use of hand interaction profiles in OpenXR. It enables XR_EXT_hand_interaction in the underyling runtime.
Inheritance
Inherited Members
Namespace: VIVE.OpenXR.Hand
Assembly: VIVE.OpenXR.dll
Syntax
public class ViveHandInteractionExt : OpenXRInteractionFeature
Fields
aim
Constant for a pose interaction binding '.../input/aim/pose' OpenXR Input Binding.
Typically used for aiming at objects out of arm’s reach. When using a hand interaction profile, it is typically paired with pointerActivateValue to optimize aiming ray stability while performing the gesture.
When using a controller interaction profile, the "aim" pose is typically paired with a trigger or a button for aim and fire operations.
Declaration
public const string aim = "/input/aim/pose"
Field Value
Type | Description |
---|---|
string |
featureId
The feature id string. This is used to give the feature a well known id for reference.
Declaration
public const string featureId = "vive.openxr.feature.hand.interaction.ext"
Field Value
Type | Description |
---|---|
string |
graspReady
Constant for a boolean interaction binding '.../input/grasp_ext/ready_ext' OpenXR Input Binding.
A boolean input, where the value XR_TRUE indicates that the hand performing the grasp action is properly tracked by the hand tracking device and it is observed to be ready to perform or is performing the grasp action.
Declaration
public const string graspReady = "/input/grasp_ext/ready_ext"
Field Value
Type | Description |
---|---|
string |
graspValue
Constant for a float interaction binding '.../input/grasp_ext/value' OpenXR Input Binding.
A 1D analog input component indicating that the user is making a fist.
Declaration
public const string graspValue = "/input/grasp_ext/value"
Field Value
Type | Description |
---|---|
string |
grip
Constant for a pose interaction binding '.../input/grip/pose' OpenXR Input Binding.
Typically used for holding a large object in the user’s hand. When using a hand interaction profile, it is typically paired with graspValue for the user to directly manipulate an object held in a hand.
When using a controller interaction profile, the "grip" pose is typically paired with a "squeeze" button or trigger that gives the user the sense of tightly holding an object.
Declaration
public const string grip = "/input/grip/pose"
Field Value
Type | Description |
---|---|
string |
kOpenxrExtensionString
OpenXR specification 12.69. XR_HTC_hand_interaction.
Declaration
public const string kOpenxrExtensionString = "XR_EXT_hand_interaction"
Field Value
Type | Description |
---|---|
string |
pinchPose
Constant for a pose interaction binding '.../input/pinch_ext/pose' OpenXR Input Binding.
Typically used for directly manipulating a small object using the pinch gesture. When using a hand interaction profile, it is typically paired with the pinchValue.
When using a controller interaction profile, it is typically paired with a trigger manipulated with the index finger, which typically requires curling the index finger and applying pressure with the fingertip.
Declaration
public const string pinchPose = "/input/pinch_ext/pose"
Field Value
Type | Description |
---|---|
string |
pinchReady
Constant for a boolean interaction binding '.../input/pinch_ext/ready_ext' OpenXR Input Binding.
A boolean input, where the value XR_TRUE indicates that the fingers used to perform the "pinch" gesture are properly tracked by the hand tracking device and the hand shape is observed to be ready to perform or is performing a "pinch" gesture.
Declaration
public const string pinchReady = "/input/pinch_ext/ready_ext"
Field Value
Type | Description |
---|---|
string |
pinchValue
Constant for a float interaction binding '.../input/pinch_ext/value' OpenXR Input Binding.
A 1D analog input component indicating the extent which the user is bringing their finger and thumb together to perform a "pinch" gesture.
Declaration
public const string pinchValue = "/input/pinch_ext/value"
Field Value
Type | Description |
---|---|
string |
pointerActivateReady
Constant for a boolean interaction binding '.../input/aim_activate_ext/ready_ext' OpenXR Input Binding.
A boolean input, where the value XR_TRUE indicates that the fingers to perform the "aim_activate" gesture are properly tracked by the hand tracking device and the hand shape is observed to be ready to perform or is performing an "aim_activate" gesture.
Declaration
public const string pointerActivateReady = "/input/aim_activate_ext/ready_ext"
Field Value
Type | Description |
---|---|
string |
pointerActivateValue
Constant for a float interaction binding '.../input/aim_activate_ext/value' OpenXR Input Binding.
A 1D analog input component indicating that the user activated the action on the target that the user is pointing at with the aim pose.
Declaration
public const string pointerActivateValue = "/input/aim_activate_ext/value"
Field Value
Type | Description |
---|---|
string |
poke
Constant for a pose interaction binding '.../input/poke_ext/pose' OpenXR Input Binding.
Typically used for contact-based interactions using the motion of the hand or fingertip. It typically does not pair with other hand gestures or buttons on the controller. The application typically uses a sphere collider with the "poke" pose to visualize the pose and detect touch with a virtual object.
Declaration
public const string poke = "/input/poke_ext/pose"
Field Value
Type | Description |
---|---|
string |
profile
The interaction profile string used to reference the hand interaction input device.
Declaration
public const string profile = "/interaction_profiles/ext/hand_interaction_ext"
Field Value
Type | Description |
---|---|
string |
Methods
OnInstanceCreate(ulong)
Called when xrCreateInstance is done.
Declaration
protected override bool OnInstanceCreate(ulong xrInstance)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrInstance | The created instance. |
Returns
Type | Description |
---|---|
bool | True for valid XrInstance |
Overrides
RegisterActionMapsWithRuntime()
Registers action maps to Unity XR.
Declaration
protected override void RegisterActionMapsWithRuntime()
Overrides
RegisterDeviceLayout()
Registers the ViveHandInteractionExt.HandInteractionExtDevice layout with the Input System.
Declaration
protected override void RegisterDeviceLayout()
Overrides
UnregisterDeviceLayout()
Removes the ViveHandInteractionExt.HandInteractionExtDevice layout from the Input System.
Declaration
protected override void UnregisterDeviceLayout()