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: solution.dll
Syntax
[Preserve]
[InputControlLayout(displayName = "XR Hand Device", commonUsages = new string[] { "LeftHand", "RightHand" })]
public class XRHandDevice : TrackedDevice
Remarks
The devicePosition and deviceRotation inherited from 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
Name | Description |
---|---|
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. |
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. |
leftHand | The left-hand InputDevice that contains InputControls that surface common controller data populated by hand joint poses. |
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. |
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. |
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. |
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. |
rightHand | The right-hand InputDevice that contains InputControls that surface common controller data populated by hand joint poses. |
Methods
Name | Description |
---|---|
FinishSetup() | Perform final initialization tasks after the control hierarchy has been put into place. |