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.
This commit is contained in:
Campbell Suter 2022-06-02 00:34:25 +12:00 committed by Jakob Bornecrantz
parent 45703f0952
commit bb414f7d39

View file

@ -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};