This project provides simple code to calculate rebound angles for a ball which hits vertical and horizontal edges in Scratch. The code can be used in games similar to Pong, Brick games and sports games. Run the project many times for different random start directions. * If you want to rebound off surfaces that are inclined at other angles, see this excellent project by @deck26
Code by me. Rebound directions calculated by me with pen and paper: If the ball hits a vertical wall (left or right wall) then Rebound Direction = Approach Direction * -1 If the ball hits a horizontal wall (top or bottom wall) then Rebound Direction = 180 - Approach Direction