Skip to content

Commit

Permalink
Merge pull request #92801 from devloglogan/has-tracking-data-fix
Browse files Browse the repository at this point in the history
Set `XRHandTracker` property `has_tracking_data` to true only when palm joint is tracked
  • Loading branch information
akien-mga committed Jun 7, 2024
2 parents 7a5fad8 + a64b0d3 commit 747e0f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/openxr/extensions/openxr_hand_tracking_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 747e0f5

Please sign in to comment.