Merge pull request #92801 from devloglogan/has-tracking-data-fix

Set `XRHandTracker` property `has_tracking_data` to true only when palm joint is tracked
This commit is contained in:
Rémi Verschelde 2024-06-07 23:30:24 +02:00
commit 747e0f5ef0
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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 {