Meta Body Tracking
Note
Check out the Meta Body Tracking Sample Project for a working demo of some Meta body tracking features.
The Godot OpenXR Vendors plugin supports a number of OpenXR extensions related to Meta body tracking. This document will walk through the provided features and how to use them.
Project Settings
To use body tracking, the Meta body tracking setting must be enabled in project settings. The extension setting can be found in Project Settings under the OpenXR section, the Body Tracking setting should be listed under Extensions in the Meta subcategory.
Body Tracking Setup
Body tracking features require a rigged mesh that can be retargeted to the Godot Humanoid layout. See the Godot documentation on Retargeting 3D Skeletons for more info.
A skeleton being retargeted to the Godot Humanoid profile in the model's import settings
After you have a properly imported skeleton, you can apply body tracking to it with the XRBodyModifier3D node. Add this node as a child of the model's Skeleton3D.
The XRBodyModifier3D node's body_update property lets you indicate which areas of
the skeleton you'd like to apply tracking data to: upper body, lower body, and hands.
The bone_update property specifies how this data is applied: full (rotation and position),
or rotation only.
Note
While hand tracking may be used as a part of body tracking, the hand tracking extension must be enabled to do this. See the documentation on Meta Hand Tracking for more info.
Lower Body Tracking
The basic Meta OpenXR body tracking extension XR_FB_body_tracking only provides data
for upper body tracking. The extension XR_META_body_tracking_full_body, if supported,
is what provides the lower body data. When supported by the runtime, this requires no further
setup. You can check if XR_META_body_tracking_full_body is supported by calling
is_full_body_tracking_supported().
Manual Height Override
When using body tracking, automatic calibration of a user's height will take place.
Should you wish to override this, first check to see if the runtime supports the XR_META_body_tracking_calibration
extension with is_body_tracking_height_override_supported().
If supported, you may suggest an override value within the range of 0.5 and 3.0 meters to
suggest_body_tracking_height_override().
The runtime then may adjust the returned body tracking data to be scaled to this height.
Body Tracking Fidelity
The XR_META_body_tracking_fidelity extension allows users to request that body tracking
data be collected with either a low or high level of fidelity. Check if this extension is supported with
is_body_tracking_fidelity_supported().
If supported, you can request your desired fidelity level using
request_body_tracking_fidelity().
By default, a high level of fidelity is used for body tracking, but low fidelity may be used to
save CPU resources at the cost of lower body tracking precision.