Help on a project on processing
in
Programming Questions
•
8 months ago
im trying to make something like a brick breaker but im stuck on trying to make the ball bounce off on all 4 sides of the paddle
but i only got the top part
i used this code to get the ball to bounce off the top of the paddle:
if (x > px && x < px + pw && y + h > py)
yspeed = yspeed * -1;
can someone help me with the other sides especially the right/left sides
1