how to make a curve motion with ball object

• 06-25-2013, 01:59 PM
nisael
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).
• 06-25-2013, 05:31 PM
jim829
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
• 01-19-2014, 04:26 AM
Daryn
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
• 01-19-2014, 06:08 AM
natdizzle
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.