Simple Bounce Algorithm
We can calculate a simple rebound angle of a ball on a paddle via the following algorithm:
Rebound angle = 180 – direction at collision
1. Draw sprites
Make sure ball and paddle sprites are centred:
2. Add scripts
- adjust controls and speed for paddle to your pleasing. Do you prefer keyboard or mouse?
- try the breakout challenge below before you go improving this game