From a870344405a80823de1eb2c937ceba44ee337095 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Wed, 13 May 2026 11:50:02 +0200 Subject: [PATCH] Split pico4/4u controller offsets Values provided in https://github.com/WiVRn/WiVRn/pull/908#issuecomment-4439106699 --- client/hmd_traits.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/client/hmd_traits.cpp b/client/hmd_traits.cpp index 0649670d..6c9f909a 100644 --- a/client/hmd_traits.cpp +++ b/client/hmd_traits.cpp @@ -441,7 +441,7 @@ std::pair hmd_traits::controller_offset(xr::spaces space) break; } } - else if (profile == "pico-4" or profile == "pico-4u") + else if (profile == "pico-4") { switch (space) { @@ -459,6 +459,24 @@ std::pair hmd_traits::controller_offset(xr::spaces space) break; } } + else if (profile == "pico-4u") + { + switch (space) + { + case xr::spaces::grip_left: + case xr::spaces::grip_right: + return {{0, -0.042, -0.042}, glm::angleAxis(glm::radians(-8.f), glm::vec3{1, 0, 0})}; + + case xr::spaces::aim_left: + return {{-0.005, 0, 0.02}, {1, 0, 0, 0}}; + + case xr::spaces::aim_right: + return {{0.005, 0, 0.02}, {1, 0, 0, 0}}; + + default: + break; + } + } else if (profile == "htc-vive-focus-3") { switch (space)