diff options
Diffstat (limited to 'modules/openxr/extensions/openxr_hand_tracking_extension.cpp')
-rw-r--r-- | modules/openxr/extensions/openxr_hand_tracking_extension.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/openxr/extensions/openxr_hand_tracking_extension.cpp b/modules/openxr/extensions/openxr_hand_tracking_extension.cpp index b8a2f58935..d9a66aa827 100644 --- a/modules/openxr/extensions/openxr_hand_tracking_extension.cpp +++ b/modules/openxr/extensions/openxr_hand_tracking_extension.cpp @@ -293,7 +293,12 @@ void OpenXRHandTrackingExtension::on_process() { } godot_tracker->set_hand_tracking_source(source); - godot_tracker->set_pose("default", transform, linear_velocity, angular_velocity); + if (location.locationFlags & XR_SPACE_LOCATION_POSITION_TRACKED_BIT) { + godot_tracker->set_pose("default", transform, linear_velocity, angular_velocity); + } else { + godot_tracker->set_has_tracking_data(false); + godot_tracker->invalidate_pose("default"); + } } } } else { |