improve paddle hitbox
This commit is contained in:
1 file changed
+2
-2
+2
-2
@@ -61,7 +61,7 @@ pub struct Ball {
|
|||||||
impl Default for Ball {
|
impl Default for Ball {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Ball {
|
Ball {
|
||||||
x: X_BOUNDS.0 + 2.0,
|
x: X_BOUNDS.1 - 1.5,
|
||||||
y: PADDLE_Y + 2.0,
|
y: PADDLE_Y + 2.0,
|
||||||
x_velocity: 0.5,
|
x_velocity: 0.5,
|
||||||
y_velocity: 0.5,
|
y_velocity: 0.5,
|
||||||
@@ -85,7 +85,7 @@ impl Ball {
|
|||||||
self.x_velocity = 0.5;
|
self.x_velocity = 0.5;
|
||||||
self.y_velocity = 0.5;
|
self.y_velocity = 0.5;
|
||||||
} else {
|
} else {
|
||||||
self.x = paddle.x - 2.0;
|
self.x = paddle.x - 1.5;
|
||||||
self.y = paddle.y + 2.0;
|
self.y = paddle.y + 2.0;
|
||||||
self.x_velocity = -0.5;
|
self.x_velocity = -0.5;
|
||||||
self.y_velocity = 0.5;
|
self.y_velocity = 0.5;
|
||||||
|
|||||||
Reference in new issue
Block a user