OpenXR
The SenseGlove Unreal Engine Plugin has provided OpenXR-compatible hand tracking by implementing XR_EXT_hand_tracking
since v2.1.0
.
Typically a user does not need to know anything about OpenXR to use the plugin, so this section of the handbook is for advanced users who are looking for a way to directly consume the OpenXR data coming directly from either a SenseGlove device or if enabled in the plugin settings from hand-tracking.
Since the SenseGlove Unreal Engine Plugin registers itself as an OpenXRHandTracking
motion controller device it becomes a hand-tracking provider for Unreal Engine, thus the OpenXR data from SenseGlove could always be retrieved from the Unreal Engine's IXTrackingSystem
with one caveat. The caveat is if another OpenXR-compatible hand-tracking plugin, e.g. Epic's own OpenXRHandTracking, is enabled simultaneously it's not guaranteed that the FXRMotionControllerData
and FXRHandTrackingState
structs retrieved from the IXTrackingSystem::GetMotionControllerData()
and IXTrackingSystem::GetHandTrackingState()
methods are coming from SenseGlove, as these methods return the first hand-tracking plugin they could find. Thus, SenseGlove provides its own implementation of GetMotionControllerData()
and GetHandTrackingState()
which guarantee the retrieved FXRMotionControllerData
or FXRHandTrackingState
are coming from the SenseGlove Unreal Engine Plugin; and this is the preferred way to that.
note
In order to retrieve the latest FXRMotionControllerState
available, The
SenseGlove Unreal Engine Plugin provides an alternative implementation for
IXTrackingSystem::GetMotionControllerState()
as well . However, since this
method does not rely on the OpenXRHandTracking
provider, it may become
redundant. As a result, we might consider removing this functionality in
future updates in favor of the one that Unreal Engine provides.
important
Unreal Engine versions 5.2
, 5.3
, and 5.4
are limited to
FXRMotionControllerData
since at the time of their release no
FXRHandTrackingState
was available.
Also please keep in mind that, while FXRMotionControllerData
is pretty much
usable and functional in Unreal Engine 5.5
, it is recommended to utilize
FXRHandTrackingState
instead. This is because this version of UE has
deprecated FXRMotionControllerData
in favor of the
FXRMotionControllerState
and FXRHandTrackingState
structs. Prior to
version 5.5
, FXRMotionControllerData
handled both motion controller and
hand tracking data. From 5.5
onward, these responsibilities have been
separated into the two distinct structs, providing clearer and more
specialized handling of each.
In the next sections we'll see:
-
How we can directly consume the
FXRMotionControllerData
on UE5.2
,5.3
,5.4
, and5.5
to draw and animate debug virtual hands in both Blueprint and C++. -
How we can directly consume the
FXRHandTrackingState
on UE5.5
to draw and animate debug virtual hands in both Blueprint and C++.