Original Post
Hi, I am Implementing a game my ball is moving upward and hitting the top wall,left wall wat the program meant to do ? but there is a bat in the middle of display window,When the ball have to hit the bat it have to bounce back towards the wall.I displayed the bat with the three points x,y,z and my look like a straight line like e.g. --------------- x y z If the ball hit the bat after hitting it how will it bounce back? i m using equation if ((v <= x) || (v <= y) || (v<=z)) { d = -d; } where v is movement of ball in x direction, x,y,z are the position of bat.