diff --git a/client/scenes/lobby.cpp b/client/scenes/lobby.cpp index 4ac1ffbf..39e693d5 100644 --- a/client/scenes/lobby.cpp +++ b/client/scenes/lobby.cpp @@ -973,14 +973,14 @@ void scenes::lobby::render(const XrFrameState & frame_state) auto windows = imgui_ctx->windows(); auto left = left_hand->locate(world_space, frame_state.predictedDisplayTime); - if (left and xr::hand_tracker::check_flags(*left, XR_SPACE_LOCATION_POSITION_TRACKED_BIT | XR_SPACE_LOCATION_POSITION_VALID_BIT, 0)) + if (left) { stick_finger_to_gui(*left, windows); hide_left_controller = true; } auto right = right_hand->locate(world_space, frame_state.predictedDisplayTime); - if (right and xr::hand_tracker::check_flags(*right, XR_SPACE_LOCATION_POSITION_TRACKED_BIT | XR_SPACE_LOCATION_POSITION_VALID_BIT, 0)) + if (right) { stick_finger_to_gui(*right, windows); hide_right_controller = true; diff --git a/client/xr/hand_tracker.cpp b/client/xr/hand_tracker.cpp index 3a8b2574..1be57f10 100644 --- a/client/xr/hand_tracker.cpp +++ b/client/xr/hand_tracker.cpp @@ -74,8 +74,8 @@ std::optional> xr:: if (!locations.isActive) return std::nullopt; - // bail if none of the joints are valid/tracked - if (!std::ranges::any_of(joints_pos, [](const auto & loc) { return loc.locationFlags != 0; })) + // bail if any of the joint is invalid + if (std::ranges::any_of(joints_pos, [](const auto & loc) { return loc.locationFlags == 0; })) return std::nullopt; std::array joints;