1
0
mirror of https://github.com/godotengine/godot synced 2024-07-05 16:03:36 +00:00

Set XRHandTracker property has_tracking_data to true only when palm joint is tracked

This commit is contained in:
Logan Lang 2024-06-05 17:07:24 +02:00
parent 705b7a0b0b
commit a64b0d3830

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 {