ball_move_x += ball_vel;
if(ball_move_x>=screen_width)
{
ball_move_x -= ball_vel;
}
I think I have to reverse the velocity of the ball when it hits the screen side.




Posted 20 October 2012 - 02:43 PM
ball_move_x += ball_vel;
if(ball_move_x>=screen_width)
{
ball_move_x -= ball_vel;
}
Posted 10 December 2012 - 04:39 PM
xPos += xVel;
if(xPos >= screenWidth)
{
xPos -= xVel;
xVel = -xVel;
}
