All notable changes to this package will be documented in this file.
[1.1.0] - 2023-03-16
XRHandDeviceand automatic managing of it if the Input System is enabled and hand-tracking is enabled in the target platform's build settings.
HandVisualizersample now opts into using optimized controls in the Input System if you enable the Use Optimized Controls option. You must be on at least version 1.5.0 of the Input System package for this to have an effect.
handednessgetter property to
XRHandSubsystemto allow the most recent
UpdateSuccessFlagsto be polled. This value matches the argument to the
The OpenXR package must be installed and enabled for these to work:
- Added OpenXR support through
- Added support for Meta Hand Tracking Aim extension in OpenXR through
MetaAimFlagshave been moved outside of the
MetaHandTrackingAimtype and moved from the
UnityEngine.XR.Hands. The same input bindings will work the same as before.
- The HandVisualizer sample meshes has been updated.
- Changed Hand Visualizer component so it skips setting the shared material on the instantiated hand mesh prefabs when the Hand Mesh Material property is not set.
- Providers must now create joints with a known
- Changed Meta Aim Hand input devices that are added to the Input System to continue updating the
deviceRotationcontrols even when the
MetaAimFlags.Validbit flag is not set. Instead it uses whether the hand root is valid. In practice, the
MetaAimFlags.Validflag currently does not necessarily indicate whether the pose is valid but instead is based on whether the user is in a natural orientation for distant UI panel selection.
- Changed HandVisualizer sample by adding an Assembly Definition file (
- Fixed issue where OpenXR would incorrectly report joints as having updated when they weren't actually tracked that frame.
trackingLost, as well as
XRHand.isTracked, will now work as expected.
- Fixed issue where
<XRHandDevice>/trackingStatecontrols would never clear.
MetaAimHandto also include
- Fixed lifetime of GameObjects in
HandVisualizerso it uses the
XROrigin.Originproperty instead of the Transform of the
XROriginitself when transforming joints.
- Reinstated the validation rule that the Meta Touch Interaction Profile is required in the OpenXR Interaction Profiles list.
- OpenXR hand root poses now match the wrist, not the palm.
[1.0.0-pre.2] - 2022-10-26
Added subsystem for cross-platform hand-tracking and accompanying types.
Types you might care about as a user:
XRHandSubsystemDescriptor, which you can retrieve a
XRHandSubsystem, which can be created with a call to
Createon the above descriptor type.
XRHand, which you can retrieve from
rightHandproperties. These contain joints and
rootPosedata, as well as its
XRHandJoint, which you can retrieve from each
GetJointto query for joint tracking state, pose, radius, and velocity data on a per-joint basis.
XRHandJointIDUtility, which contains extension methods for certain
enums listed below and also houses
FromIndex, which you can use when looping over an array to get the corresponding
XRHandJointID(useful when calling
As well as these
XRHandJointTrackingState, a flags-
enumused to denote which fields are valid and can be retrieved via their
XRHandJointID, used to identify each joint, and required when accessing joint data using
XRHand.GetJoint. If looping over an array of joint data, use
XRHandJointIDUtility.FromIndexto convert your index to
XRHandJointID, which is required for
Handedness, used to identify which hand is referred to by an
XRHandFingerID, not used anywhere else in the API surfaced in this package besides its extension methods in
GetBackJointID, which together provider an inclusive range for
XRHandJointIDs spanned by the finger represented by
Additional types you may need to interact with if writing a provider (not a common use case):
XRHandSubsystemProvider, which the subsystem asks for data whenever its
TryUpdateHandsis called (built-in Unity setup calls this each frame) and is also queried when the subsystem and provider are created for which common joints are in the provider's layout using
XRHandProviderUtility, which providers should call into using
TryUpdateHandsper-frame call to fill out the left- and right-hand joint arrays. This same type also has a nested
SubsystemUpdatertype to be used for automatically updating the subsystem each frame. Users can respond to updates by subscribing to the subsystem's
Also added a visualizer sample, which demonstrates drawing using both meshes and per-joint prefabs. You can add this sample to your project through the Samples tab of this package's view in the Package Manager window. This sample has a mesh and script that assume OpenXR layout, so it is recommended you either use that plug-in or another one that conforms to the OpenXR hand joint layout.