# Thread: how to make a curve motion with ball object

1. Member
Join Date
Jun 2013
Posts
1
Rep Power
0

## how to make a curve motion with ball object

i want to make a simply game,actualy not a game but i want to moving object curve just like angry bird.
where i can move an object with curve motion.
but i dont know how.
i just can make it move straight(left,right,down,up).

2. Senior Member
Join Date
Jan 2013
Location
Northern Virginia, United States
Posts
5,839
Rep Power
10

## Re: how to make a curve motion with ball object

A curve is nothing more than a series of x,y coordinates. So if f(x) is your curve equation then y = f(x) provides the two points.

To start off simple, use y = mx + b for a straight line. By varying the sign and value of the slope (m) and the y intercept(b) you can draw a diagonal line. If you want to move the object from upper left corner to lower right corner of a square, use y = x, where the slope would be 45 degrees (or m = 1).

Regards,
Jim

3. Senior Member
Join Date
Oct 2012
Posts
176
Rep Power
5

## Re: how to make a curve motion with ball object

to curve like a projectile being thrown you just subtract from the y each time and it will curve

4. ## Re: how to make a curve motion with ball object

take a look at my program called "enemyShip" under the java programming education section of my website displayed under my signature. it uses the same functionality that you are talking about, already written. but you would have to poke around a bit.

Enemy ship