Hello again! Hopefully this will be the last time I'll need help with my project. I am having trouble with my collision detection. I spawned 6 enemy circles (forgive the sloppiness, I didn't want to deal with arrays) and they all have the same code for collision detection. Unfortunately only 1 or 2 of them is working and I can't find out why it won't detect. So any help would be awesome. Thanks!
As you can see. There is an error for an unexpected beginning parenthesis. But I've looked through the code and I haven't found where this error is and processing isn't showing where it is. Any help you can give me would be amazing.
Hello, all. I'm having trouble with some tweening that i'm trying to do.
My goal is to have random circles move across the screen. I want them to start at random locations, move across the screen, and end at a random location. The problem is I can't control the speed and the tweening like I want to. Could you guys help me at all? Thanks!
float x;
float y;
float myX= 50;
float myY=35;
float easing =.1;
float r=random(100);
float damping = 0.09;
void setup () {
frameRate(60);
noCursor();
size (600, 600);
smooth();
ellipseMode(CENTER);
}
void draw() {
background(51);
myX=mouseX;
float dx=myX -x;
if (abs(dx) > 1) {
x+=dx * easing;
}
myY=mouseY;
float dy=myY -y;
if (abs(dy) > 1) {
y += dy * easing;
}
fill(65, 255, 41);
ellipse(x, y, 33, 33);
float startX = random(600); // random start X location
float stopX = random(600); //random stop X location
float startY = random(600); // random start Y location
float stopY= random(600); // random stop Y location
Hello, all! I'm very new to processing so bare with me. I'm trying to create a game where the player moves a rectangle around with their mouse and dodges triangles that move randomly across the screen. Of course i'm having trouble with generating the triangles at random and animating them properly. Any help you can give me would be most appreciated! Thanks a lot!