The problem here is not collision or movement of paddles...its the angle of the ball when it collides with either of the paddle sprites. I've worked out some temporary math using various x and y vals, but I need a permanent solution to work with both paddles. I also need a sort of "inverted" solution to use with the top and bottom border sprites for collision.
I suck at math, soooo...Doing this at 4:00 probably doesn't help, though...
Anyone good at math? I don't think its really that hard to do from a mathematical standpoint, but I just can't seem to stay focused long enough or wrap my head around whats going on in order to fix the issues.
PLEASE, somebody help!
Offline
It depends...is the ball moving with direction and speed or with x and y values?
Offline
If you're using x- and y-velocity, just flip (multiply by -1) the x-velocity if it hits a vertical surface (a wall; left or right of screen) or the y-velocity if it hits a horizontal surface (ceiling or floor; top or bottom of screen). That'll simulate bouncing.
Offline