Thursday, March 5, 2015

Ping pong game, ball moving like classic

This may not actually answer your question, but you have an error on your third condition down where you are comparing Ball_objekt.Top <= playground.Top. You are then reversing the ball's horizontal speed (speed_left) rather than its vertical speed (speed_top).



if (Ball_objekt.Top <= playground.Top)
{
speed_top = -speed_top; // <-- here
}




No comments:

Post a Comment