Unit 6 - Collision Detection
All the hint documents are here
Collision Detection - How to 'Catch' an object - Video
Your program needs variables for:
- catcher left side (the catcher's x-coordinate)
- catcher right side (the x-coordinate with the catcher's width added on)
- catcher y-coordinate
- object left side (the object's x-coordinate)
- object right side (the x-coordinate with the object's width added on)
- object y-coordinate.
YOU WILL DEFINE THOSE VARIABLES. Make sure the variable names are REPRESENTATIVE of what they store.
You should have a println() statement at the bottom of your draw() loop that shows,
println(catcher x, object x, object right, catcher right, object y, catcher y);
To help you understand what's going on with those variables to help you detect a collision
Here is the BIG Collision Logic Diagram!!!