mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 04:36:07 +00:00
d/ht_ctrl_emu: Fix pinch detection
This commit is contained in:
parent
4b6491aa16
commit
c750d714a9
|
@ -369,10 +369,10 @@ decide(xrt_vec3 one, xrt_vec3 two, bool *out)
|
|||
float dist = m_vec3_len_sqrd(one - two);
|
||||
// These used to be 0.02f and 0.04f, but I bumped them way up to compensate for bad tracking. Once our tracking
|
||||
// is better, bump these back down.
|
||||
float activation_dist = 0.04f;
|
||||
float deactivation_dist = 0.1f;
|
||||
float activation_dist = 0.02f;
|
||||
float deactivation_dist = 0.04f;
|
||||
const float pinch_activation_dist =
|
||||
(*out ? activation_dist * activation_dist : deactivation_dist * deactivation_dist);
|
||||
(*out ? deactivation_dist * deactivation_dist : activation_dist * activation_dist);
|
||||
|
||||
*out = (dist < pinch_activation_dist);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue