Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round the paddle angle #3

Closed
Natim opened this issue Aug 6, 2019 · 3 comments

Comments

@Natim
Copy link
Contributor

commented Aug 6, 2019

With the current condition, the contact is made between the center of the ball and a point of the pad.

However, sometime, the center doesn't hit the pad but the ball does.
Especially in the angle.

We could:

  • Change the condition to handle this case
  • Round the pad so that this case doesn't happens anymore.
@Natim

This comment has been minimized.

Copy link
Contributor Author

commented Aug 6, 2019

image

@magopian

This comment has been minimized.

Copy link
Owner

commented Aug 7, 2019

I was thinking about dealing with this in the 4th blog post: in the original pong

  • the ball is a square, so the hitbox is simpler to check
  • the paddle bounces the ball with an angle: the closer to the edge the ball gets, the bigger the angle (see The Ball <-> Racket Collision Angle)
@magopian

This comment has been minimized.

Copy link
Owner

commented Aug 7, 2019

This is now fixed in 869c359

Thanks @Natim !

@magopian magopian closed this Aug 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.