How to make image disappear upon collision with rectangle in processing?
问题 I am making a game for my college project and I need help. I am making a game where you control a car with your mouse on the y-coordinate. You have to avoid the people and collect coins that are moving on the y-coordinate as well. I want the images I put in of the people and the coins to disappear upon collision with the rectangle part of my car in Processing 3 . This is my code: PImage img,img1,img2,img3,img4,img5; int x,y; float ypos=0; float ypos2=4; void setup() { size(1000,585); img =