Hey i’m using PImage to make my game and i’m trying to record a collision between my caterpillar and the birds to reset the score back to 0 if it happens.
I know how to record collision with basic shapes such as rect but do i need to create a new variable for my each of my classes to check the positions?
The caterpillar is moved by mouseX and Y and the birds are an array that each move on a random y value and with this code `void move() {
x= x + xspeed * direcction;
if (x>1280) {
direcction=-1;
} else if (x<0) {
direcction=1;
}`