Don't show hands if position is not tracked+valid
This commit is contained in:
@@ -79,3 +79,10 @@ std::optional<std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT>> xr::
|
||||
|
||||
return joints;
|
||||
}
|
||||
|
||||
bool xr::hand_tracker::check_flags(const std::array<joint, XR_HAND_JOINT_COUNT_EXT> & joints, XrSpaceLocationFlags position, XrSpaceVelocityFlags velocity)
|
||||
{
|
||||
return std::ranges::all_of(joints, [position, velocity](const auto & joint) {
|
||||
return (joint.first.locationFlags & position) == position and (joint.second.velocityFlags & velocity) == velocity;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user