i have code which move the ball, but here i move ball by the position of the mouse.. and cannot figure it out how to move it by the power.
double power = 9;
int x1 = p2.x - p1.x, y1 = p2.y - p1.y;
shoot.start(p2,x1,y1, player));
p2 - ball position x and y (Point)
p1 - mouse position
x1 and y1 - how much ball will be moving to x or y

New Topic/Question
Reply



MultiQuote







|