Class XRHandDevice
An InputDevice that surfaces common controller data populated by hand joint poses. Devices will only be created if hand-tracking is enabled in the build settings for the target platform.
Inherited Members
Namespace: UnityEngine.XR.Hands
Assembly: Unity.XR.Hands.dll
Syntax
[InitializeOnLoad]
[Preserve]
public class XRHandDevice : TrackedDevice
Remarks
The UnityEngine.InputSystem.TrackedDevice.devicePosition and UnityEngine.InputSystem.TrackedDevice.deviceRotation inherited from UnityEngine.InputSystem.TrackedDevice represent the wrist pose.
Use the XROrigin in the scene to position and orient the device
and gesture poses properly. If you are using this data to set the Transform of a GameObject in
the scene hierarchy, you can set the local position and rotation of the Transform and make
it a child of the CameraOffset
object below the XROrigin
. Otherwise, you can use the
Transform of the CameraOffset
to transform the data into world space.
Properties
gripPosition
Position of the grip pose, representing the palm. When transformed relative to the XROrigin, the position will be in the correct position in the scene relative to the user.
Declaration
[Preserve]
public Vector3Control gripPosition { get; }
Property Value
Type | Description |
---|---|
Vector3Control |
gripRotation
Rotation of the grip pose, representing the palm. When transformed relative to the XROrigin, the rotation will be in the correct orientation in the scene relative to the user.
Declaration
[Preserve]
public QuaternionControl gripRotation { get; }
Property Value
Type | Description |
---|---|
QuaternionControl |
leftHand
The left-hand InputDevice that contains UnityEngine.InputSystem.InputControls that surface common controller data populated by hand joint poses.
Declaration
public static XRHandDevice leftHand { get; }
Property Value
Type | Description |
---|---|
XRHandDevice |
pinchPosition
Position of the pinch pose, representing the thumb's tip. When transformed relative to the XROrigin, the position will be in the correct position in the scene relative to the user.
Declaration
[Preserve]
public Vector3Control pinchPosition { get; }
Property Value
Type | Description |
---|---|
Vector3Control |
pinchRotation
Rotation of the pinch pose, representing the thumb's tip. When transformed relative to the XROrigin, the rotation will be in the correct orientation in the scene relative to the user.
Declaration
[Preserve]
public QuaternionControl pinchRotation { get; }
Property Value
Type | Description |
---|---|
QuaternionControl |
pokePosition
Position of the poke pose, representing the index finger's tip. When transformed relative to the XROrigin, the position will be in the correct position in the scene relative to the user.
Declaration
[Preserve]
public Vector3Control pokePosition { get; }
Property Value
Type | Description |
---|---|
Vector3Control |
pokeRotation
Rotation of the poke pose, representing the index finger's tip. When transformed relative to the XROrigin, the rotation will be in the correct orientation in the scene relative to the user.
Declaration
[Preserve]
public QuaternionControl pokeRotation { get; }
Property Value
Type | Description |
---|---|
QuaternionControl |
rightHand
The right-hand InputDevice that contains UnityEngine.InputSystem.InputControls that surface common controller data populated by hand joint poses.
Declaration
public static XRHandDevice rightHand { get; }
Property Value
Type | Description |
---|---|
XRHandDevice |
Methods
FinishSetup()
Perform final initialization tasks after the control hierarchy has been put into place.
Declaration
protected override void FinishSetup()