matrix fix
This commit is contained in:
@@ -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,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user