zachio / pong

Pong - Forever Alone Addition. This is an HTML5 game that is like pong except single player.
0 stars 0 forks source link

Better hit detection #1

Closed zachio closed 9 years ago

zachio commented 9 years ago

As the ball travels faster the paddle only detects the ball when it is drawn over it however ever the the ball is moving so fast it is drawn past it the hit detect fails. A friend of mine mentioned ray casting to solve the problem. It sounds like a complicated problem so I'm going to have to think about it for a while.

zachio commented 9 years ago

I fixed this bug with a better hit detection function. More information about the commit here.

https://github.com/zachdyer/pong/commit/30c6f405351369818988dab93dae067163459ad5