Posted 26 June 2001 - 06:39 PM
Wait a minute, your first line of code (aside from the comment) checks to see if the ball is located in the top half of the screen. This is fine if your second paddle is on the top half of the screen (if not, change the less than to a greater than). But more importantly, the line also checks whether the velocity of the ball is greater than 0. That would mean a positive velocity, which would mean the ball would be moving down (unless you are using a different coordinate system). So, if the paddle is located at the top of the screen, then why test collision when the ball is moving down? If this is your problem, you should be checking to see if ball_dy < 0.