Class MetaAimHand
A TrackedDevice based off the data exposed in the Meta Hand Tracking Aim extension. Enabled through Meta Hand Tracking Aim or by enabling hand-tracking in the Oculus plug-in if the Input System back-end is enabled.
Inherited Members
Namespace: UnityEngine.XR.Hands
Assembly: solution.dll
Syntax
[Preserve]
[InputControlLayout(displayName = "Meta Aim Hand", commonUsages = new string[] { "LeftHand", "RightHand" })]
public class MetaAimHand : TrackedDevice
Remarks
For this type to function, you must enable hand-tracking and be running with either the OpenXR or Oculus plug-in.
The devicePosition and deviceRotation inherited from TrackedDevice represent the aim pose. You can use these values to discover the target for pinch gestures, when appropriate.
Use the XROrigin in the scene to position and orient
the device 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.
Fields
Name | Description |
---|---|
pressThreshold | The pinch amount required to register as being pressed for the purposes of indexPressed, middlePressed, ringPressed, and littlePressed. |
Properties
Name | Description |
---|---|
aimFlags | Cast the result of reading this to MetaAimFlags to examine the value. |
indexPressed | A ButtonControl
that represents whether the pinch between the index finger and
the thumb is mostly pressed (greater than a threshold of |
left | The left-hand InputDevice that contains InputControls that surface data in the Meta Hand Tracking Aim extension. |
littlePressed | A ButtonControl
that represents whether the pinch between the little finger and
the thumb is mostly pressed (greater than a threshold of |
middlePressed | A ButtonControl
that represents whether the pinch between the middle finger and
the thumb is mostly pressed (greater than a threshold of |
pinchStrengthIndex | An AxisControl that represents the pinch strength between the index finger and the thumb. |
pinchStrengthLittle | An AxisControl that represents the pinch strength between the little finger and the thumb. |
pinchStrengthMiddle | An AxisControl that represents the pinch strength between the middle finger and the thumb. |
pinchStrengthRing | An AxisControl that represents the pinch strength between the ring finger and the thumb. |
right | The right-hand InputDevice that contains InputControls that surface data in the Meta Hand Tracking Aim extension. |
ringPressed | A ButtonControl
that represents whether the pinch between the ring finger and
the thumb is mostly pressed (greater than a threshold of |
Methods
Name | Description |
---|---|
CreateHand(InputDeviceCharacteristics) | Creates a MetaAimHand and adds it to the Input System. |
FinishSetup() | Perform final initialization tasks after the control hierarchy has been put into place. |
UpdateHand(bool, MetaAimFlags, Pose, float, float, float, float) | Queues update events in the Input System based on the supplied hand. It is not recommended that you call this directly. This will be called for you when appropriate. |
UpdateHand(MetaAimFlags, Pose, float, float, float, float) | Queues update events in the Input System based on the supplied hand. It is not recommended that you call this directly. This will be called for you when appropriate. |