matrix fix

This commit is contained in:
2026-05-11 17:31:02 +07:00
parent d79a9679d1
commit 4d2e961308
7 changed files with 70 additions and 58 deletions
+1 -9
View File
@@ -409,14 +409,6 @@ impl MatrixEngine {
let dx = self.gaze_target_x - cx;
let dy = self.gaze_target_y - cy;
let mut dir = 0.0;
if dx.abs() < 60.0 && dy.abs() < 60.0 {
dir = 0.0;
} else if dx.abs() > dy.abs() {
dir = if dx > 0.0 { 4.0 } else { 3.0 };
} else {
dir = if dy > 0.0 { 2.0 } else { 1.0 };
}
let distance = (dx * dx + dy * dy).sqrt();
let target_dist = (distance * 0.1_f32).min(20.0_f32);
@@ -447,7 +439,7 @@ impl MatrixEngine {
cy,
self.gaze_x,
self.gaze_y,
dir,
0.0,
self.eye_closedness,
]);