I have been making a game and have used rotations to create parts of it. I am trying to figure out how to determine whether a line that is always at a certain point that is just being rotated, can hit something that is not being rotated and is moving. Here's the coding without all the variable beginnings-
void setup(){ size(750,750); smooth(); x1 = 0; y1 = 0; s1 = 40; s2 = 20; s3 = 15; x2 = 0; y2 = -10; r = 0; shot = false; ex1 = random(5,745); ey1 = 0; ey2 = ey1 - 10; ex2 = ex1 - 30; ex3 = ex1 + 30; ey3 = ey1 + 20; es1 = 2; es2 = 2; b = 5; nb = 0; exsp = (375 - ex1) / 375; eysp =1; Explosion = loadImage("ifwt-explosion.jpg"); op = 255; destroyed = false; }