From d14b6c750c053d3fc59d495f61dfcb0a584c3d63 Mon Sep 17 00:00:00 2001 From: nicknase27 Date: Tue, 29 Sep 2026 14:08:50 +0200 Subject: [PATCH] improve paddle hitbox --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index d946496..c226e22 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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)]