On Pset4 "bounce" walkthrough, I learnt how the ball bounces horizontally. Can anyone please help me in bouncing the ball at angles after it touches the window edges and paddle?


The trajectory of the ball is a composition of x-velocity and y-velocity. if you invert one of them (from positive to negative) when you hit an obstacle, the relative movement of the ball will be inverted as well.

  • did you just answer your own question?
    – lethaljd
    Aug 1 '14 at 18:54
  • Yes. In other words, I found a question that was asked many times, and decided to publish and answer it on StackExchange to give a solid pointer to other students.
    – Cygni_61
    Aug 2 '14 at 7:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .