Don't send poses for khr/simple_controller on Quest when hand tracking data is invalid

This commit is contained in:
Sapphire
2025-06-28 10:29:46 +02:00
committed by xytovl
parent 795d88d9dc
commit 2250143f00
2 changed files with 69 additions and 10 deletions
+4
View File
@@ -77,6 +77,10 @@ std::optional<std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT>> 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; }))
return std::nullopt;
float offset_angle = 0;
// check if we have a device that needs a thumb offset