Pong

Hello, im trying to make a pong game. I have my ball bouncing around but i need to get the ball to bounce off of the paddles. Im not sure how to do this iv looked at the Circle Collision example but its to much for me to understand. If you could make it easier to understand that would be great!

Tagged:

Answers

  • Answer ✓

    Please post what you have so far. You should consider checking prev posts as this has been demonstrated many times.

    Kf

  • Answer ✓

    Please read the collision detection faq

  • edited August 2017 Answer ✓

    Just check if ball is inside paddle

    Which means

      if(ballX > paddleX && 
         ballX < paddleX+ paddleWidth && 
         ballY > paddleY) {....
    
Sign In or Register to comment.