Add debug options:

- Log driver version when starting
- Add debug menu to offset the controller mesh positions/orientations in the lobby
This commit is contained in:
Guillaume Meunier
2024-11-01 14:13:58 +01:00
parent d96f7f07a1
commit 33bde8be57
14 changed files with 1443 additions and 53 deletions
+36
View File
@@ -233,6 +233,42 @@ std::string controller_name()
__builtin_unreachable();
}
std::pair<glm::vec3, glm::quat> controller_offset(std::string_view profile, xr::spaces space)
{
if (profile == "oculus-touch-v2")
switch (space)
{
case xr::spaces::grip_left:
case xr::spaces::grip_right:
return {{0, -0.006, -0.025}, glm::angleAxis(glm::radians(-15.f), glm::vec3{1, 0, 0})};
case xr::spaces::aim_left:
return {{-0.010, 0, 0.025}, {1, 0, 0, 0}};
case xr::spaces::aim_right:
return {{0.010, 0, 0.025}, {1, 0, 0, 0}};
default:
break;
}
else if (profile == "htc-vive-focus-3")
switch (space)
{
case xr::spaces::grip_left:
case xr::spaces::grip_right:
return {{0, 0.007, -0.030}, {1, 0, 0, 0}};
case xr::spaces::aim_left:
case xr::spaces::aim_right:
return {{0, -0.025, 0.005}, {1, 0, 0, 0}};
default:
break;
}
return {{0, 0, 0}, {1, 0, 0, 0}};
}
std::string controller_ray_model_name()
{
switch (guess_model())