Help with opposite way bouncing ball
in
Programming Questions
•
8 months ago
Hello I am completely new to processing.
Anyway I found this code for a ball which scrolls down the screen but I want to make it go the other way but cant get it to move the opposite way, also what does y-- mean ? Heres the code:
int x;
int y;
void setup() {
size(500,500);
x = width/2;
y = height/2; }
void draw() {
background(200,100,100);
fill(100,200,100);
ellipse(x, y, 100, 100);
y++;
if(y>height)
y=0;
}
Thanks for any help you can give me.
1