When the runtime does not track the hands:

- Hide them in the lobby
- Don't send tracking data in the stream
This commit is contained in:
Guillaume Meunier
2024-03-30 13:44:51 +01:00
parent f49dd88b77
commit 99a5685c34
7 changed files with 84 additions and 61 deletions
+2 -4
View File
@@ -20,7 +20,7 @@
#include "hand_tracker.h"
std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT> xr::hand_tracker::locate(XrSpace space, XrTime time)
std::optional<std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT>> xr::hand_tracker::locate(XrSpace space, XrTime time)
{
XrHandJointsLocateInfoEXT info{
.type = XR_TYPE_HAND_JOINTS_LOCATE_INFO_EXT,
@@ -49,9 +49,7 @@ std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT> xr::hand_tracker::l
CHECK_XR(xrLocateHandJointsEXT(id, &info, &locations));
if (!locations.isActive)
{
// TODO
}
return std::nullopt;
std::array<xr::hand_tracker::joint, XR_HAND_JOINT_COUNT_EXT> joints;
for(int i = 0; i < XR_HAND_JOINT_COUNT_EXT; i++)