r/processing • u/MarkPossible6351 • Mar 18 '24
How to make a circle move direction using keyPressed.
so when pressed, I would like the circle to move the other direction.
I have done, this, but it doesn't seem to work:
boolean right=true;
void keyPressed() {
right ^= true;
}
2
Upvotes
1
u/tooob93 Technomancer Mar 18 '24
Hi, someone 2 days befire askes the exact same thing. Check the comments there out.
0
u/No-Entertainer-4468 Mar 18 '24
If right += 1, everything else looks okay to me