Everytime I run into the edges while still holding down the key, the direction it was supposed to take me suddenly reverses. I know this is because it reverses velocity while the edge of the ellipse is still outside of the screen, and I've tried to move the circle in the window when it moves out, but nothing I do is working. I would appreciate any help :D.
code:
boolean jumping = false;
boolean[] pressedKeys = new boolean[256];
int radius = 50;
float xvel, yvel, yAccel, xpos, ypos;
boolean [] collision = new boolean[2];
int x = -1;
int moveUp = 'w';
int slide = 's';
int moveLeft = 'a';
int moveRight = 'd';
int jump = ' ';
Hi, I'm new to Processing, so sorry if this question is insanely easy. I'm making a ball move only left and right, but I want to follow it as it moves past halfway of the screen. Then I'll be able to see the numbers that follow. Eventually, I want to follow it as it moves up and down past the display screen's y axis halfway point. How would I do this? I heard that you're supposed to use translate and push/pop matrixes, but I can't wrap my head around it. Thanks!