Skip to content

Commit

Permalink
Set XRHandTracker property has_tracking_data to true only when palm j…
Browse files Browse the repository at this point in the history
…oint is tracked
  • Loading branch information
devloglogan committed Jun 5, 2024
1 parent 705b7a0 commit a64b0d3
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 a64b0d3

Please sign in to comment.