improve paddle hitbox
CI/CD / clippy (push) Successful in 22s
CI/CD / test (push) Successful in 21s
CI/CD / Release (push) Successful in 50s

This commit is contained in:
nicknase27 committed 2026-09-29 14:08:50 +02:00
1 parent 7f7e0bb523
commit d14b6c750c
1 file changed
+3 -3
+3 -3
View File
@@ -61,7 +61,7 @@ pub struct Ball {
impl Default for Ball {
fn default() -> Self {
Ball {
x: X_BOUNDS.0 + 2.0,
x: X_BOUNDS.1 - 1.5,
y: PADDLE_Y + 2.0,
x_velocity: 0.5,
y_velocity: 0.5,
@@ -85,12 +85,12 @@ impl Ball {
self.x_velocity = 0.5;
self.y_velocity = 0.5;
} else {
self.x = paddle.x - 2.0;
self.x = paddle.x - 1.5;
self.y = paddle.y + 2.0;
self.x_velocity = -0.5;
self.y_velocity = 0.5;
}
}
}
}
#[derive(Debug, Default)]