zann1x/Breakout

Ball is not reacting pixel perfect

Opened this issue · 1 comments

When close to hitting obstacles like the paddle the ball is sometimes bouncing before if it is visually touching the obstacle.
A more precise hit detection needs to be implemented.

On this issue, I also notice either possibly 2 other problems. It could be one, the other, or both.

:: Sometimes the ball clips through the corners of bricks.
-This could be due to the non-pixel-perfect hit detection currently implemented.
:: Or, the ball is "tunneling" through bricks sometimes
- This is a common problem in collision detection especially with smaller and/or fast moving objects. (I've personally had this problem in the past but have not solved it yet.)
- One way to solve this seems to be ray casting
- One other thing to think about is implementing a Broad and a Narrow detection phase.

https://youtu.be/7_nKOET6zwI