summaryrefslogtreecommitdiffstats
path: root/modules/openxr
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2024-08-30 09:47:50 +0200
committerGitHub <noreply@github.com>2024-08-30 09:47:50 +0200
commitd40fc50f086d14583c7cc979ed4e5363ac223717 (patch)
treecc25269a35aaf8dcaa2ebce348baeca78b7b1f27 /modules/openxr
parentff9bc0422349219b337b015643544a0454d4a7ee (diff)
parent620cc30f2ad0d56a07815c4ed9f5596029976cbf (diff)
downloadredot-engine-d40fc50f086d14583c7cc979ed4e5363ac223717.tar.gz
Merge pull request #95835 from BastiaanOlij/xrnode_visibility_43
[4.3] XRNode - fix visibility issue
Diffstat (limited to 'modules/openxr')
-rw-r--r--modules/openxr/extensions/openxr_hand_tracking_extension.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/openxr/extensions/openxr_hand_tracking_extension.cpp b/modules/openxr/extensions/openxr_hand_tracking_extension.cpp
index d9a66aa827..8fe027dee7 100644
--- a/modules/openxr/extensions/openxr_hand_tracking_extension.cpp
+++ b/modules/openxr/extensions/openxr_hand_tracking_extension.cpp
@@ -225,6 +225,7 @@ void OpenXRHandTrackingExtension::on_process() {
// not successful? then we do nothing.
print_line("OpenXR: Failed to get tracking for hand", i, "[", OpenXRAPI::get_singleton()->get_error_string(result), "]");
godot_tracker->set_has_tracking_data(false);
+ godot_tracker->invalidate_pose("default");
continue;
}
@@ -235,8 +236,6 @@ void OpenXRHandTrackingExtension::on_process() {
}
if (hand_trackers[i].locations.isActive) {
- godot_tracker->set_has_tracking_data(true);
-
// SKELETON_RIG_HUMANOID bone adjustment. This rotation performs:
// OpenXR Z+ -> Godot Humanoid Y- (Back along the bone)
// OpenXR Y+ -> Godot Humanoid Z- (Out the back of the hand)
@@ -293,7 +292,8 @@ void OpenXRHandTrackingExtension::on_process() {
}
godot_tracker->set_hand_tracking_source(source);
- if (location.locationFlags & XR_SPACE_LOCATION_POSITION_TRACKED_BIT) {
+ if (location.locationFlags & XR_SPACE_LOCATION_POSITION_VALID_BIT) {
+ godot_tracker->set_has_tracking_data(true);
godot_tracker->set_pose("default", transform, linear_velocity, angular_velocity);
} else {
godot_tracker->set_has_tracking_data(false);