From fb7d0560409b90596d9064fe117095710dec88a3 Mon Sep 17 00:00:00 2001 From: galister <22305755+galister@users.noreply.github.com> Date: Thu, 25 Apr 2024 09:20:41 +0900 Subject: [PATCH] fix: autopilot thresholds & invert horizontal --- src/core/ext_autopilot.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/core/ext_autopilot.rs b/src/core/ext_autopilot.rs index 0447a34..bdae709 100644 --- a/src/core/ext_autopilot.rs +++ b/src/core/ext_autopilot.rs @@ -99,13 +99,11 @@ impl ExtAutoPilot { status_set = true; if let Some(eye) = tracking.data.eyes[0] { - let deg_z = eye.z.atan().to_degrees(); - if !(-22. ..=30.).contains(°_z) { - look_horizontal = (deg_z * -0.02).clamp(-1., 1.); + if !(-0.6..=0.5).contains(&eye.z) { + look_horizontal = -eye.z; } - let deg_y = eye.y.atan().to_degrees(); - if deg_y > 22. && !self.jumped { + if eye.y > 0.4 && !self.jumped { bundle.send_input_button("Jump", true); self.jumped = true; } else if self.jumped {