We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Im trying to make code based off of my previous code. I want to make random balls come into the screen and then leave the screen from random directions without bouncing. How would I go about doing this?
This is what i have:
float circleX;
float xspeed=3;
void setup(){
size(400,400);
circleX=0;
}
void draw(){
background(51);
fill(102);
stroke(255);
ellipse(circleX,height/2,32,32);
circleX = circleX + xspeed;
if(circleX>width || circleX<0){
xspeed=xspeed*-1.1;
}
}
Answers
https://forum.processing.org/two/discussion/8082/from-several-variables-to-arrays