Pong Ball Physics
Pong Ball Physics
I dislike math. Can someone help me out with pong physics?
Sorry for double post but I have another question...
would this work for colision?
would this work for colision?
Code: Select all
//P1 colision
/* If ball.x == paddle1.x
and
if ball.y is lessthan Paddle1y+28(height of paddle) and is biggerthan paddley
*/
if(x+6 == p1x && y < p1y+28 && y > p1y){
if(dir == 1){
dir = 2;
} else {
dir = 1;
}
-
sauke