improve paddle hitbox
This commit is contained in:
1 file changed
+3
-3
+3
-3
@@ -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)]
|
||||
|
||||
Reference in new issue
Block a user