In our latest class, we established our collision and bouncing system using a two-step process:
- Identify whether or not our ball was still inside of the field of play
- If we are outside of the box, figure out what our position inside should be and move the ball there.
To use this, we will run a number of checks and scenarios using the “if/elseif” and “switch” conditional statements.
continue reading