From bb414f7d39d0f439e1f455df1f3aa481db2b7e3d Mon Sep 17 00:00:00 2001 From: Campbell Suter Date: Thu, 2 Jun 2022 00:34:25 +1200 Subject: [PATCH] d/qwerty: Fix the aim pose not being HMD-relative Commit e41cc1eec3 added support for the XRT_INPUT_SIMPLE_AIM_POSE pose input in the QWERTY driver. Unfortunately it didn't change the code that identifies whether the pose for a controller or HMD is being read. In the QWERTY driver, the hands are positioned relative to the HMD, so if you move or rotate the HMD the hands stay in the same place on-screen. Whether a pose lookup is multiplied by the HMD transform depends on whether the pose being looked up is that of a controller. Thus the aim pose would not be positioned relative to the HMD. --- src/xrt/drivers/qwerty/qwerty_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xrt/drivers/qwerty/qwerty_device.c b/src/xrt/drivers/qwerty/qwerty_device.c index 77e066c6f..8a9ac7e5b 100644 --- a/src/xrt/drivers/qwerty/qwerty_device.c +++ b/src/xrt/drivers/qwerty/qwerty_device.c @@ -190,7 +190,7 @@ qwerty_get_tracked_pose(struct xrt_device *xd, // HMD Parenting - bool qd_is_ctrl = name == XRT_INPUT_SIMPLE_GRIP_POSE; + bool qd_is_ctrl = name == XRT_INPUT_SIMPLE_GRIP_POSE || name == XRT_INPUT_SIMPLE_AIM_POSE; struct qwerty_controller *qc = qd_is_ctrl ? qwerty_controller(&qd->base) : NULL; if (qd_is_ctrl && qc->follow_hmd) { struct xrt_relation_chain relation_chain = {0};