@ReD_eYe, Yeah, you could use that, but then the path of the object would make out a circle, where the projectile path of an object in the real world traces out a parabolic curve.
The best way would be to break the movement up into two components, vertical and horizontal.
The horizontal component is ALWAYS constant for any projectile.
The vertical component will increase/decrease with the efects of gravity. Ie, it will have a downward acceleration.
If you set the initial upward velocity of the object to something of the order of 5 ( ie, it would move 5 units in the vertical component each loop ) and set the gravity to 1 to start with. You can then easily use simple checks to change the vertical velocity.
If you want, you can change the angle of projection, and then work out the vertical and horizontal initial velocities based on the initial velocity of the object... This is best descibed with a picture;
/|
Initial / |
Velocity (U) / | Initial Vertical Velocity (Uv)
U = variable / | Uv = U * sin(theta)
/ |
/ |
/__0_________|
Initial Horizontal Velocity (Uh)
Uh = U * Cos(theta)
Where 0 = theta = the angle of projection
You would then use Uh ( Initial Horizontal Velocity ) As the contsant horizontal movement each loop.
Then use Uv ( Initial Vertical Velocity ) Along with your variable for Gravity ( You'll just have to test that to see what works best in your program ) to work out the height of the object along its path.
To do this, use something like this;
`BEFORE LOOP
`Since Gravity act's downward, this is a negative number.
Ugrav = -1
grav = Ugrav
U = 7
theta = 60 : `A steep-ish angle of projection
Uv = U * Sin(theta)
Uh = U * Cos(theta)
Uy = Object Position Y(obj) : `Just the starting Y positoin of the object
`IN LOOP
Do
`Calculates The Relative Horizontal Component Of the Object
objx# = NewXValue(objx#,Object Angle Y(obj),Uh)
objz# = NewZValue(objz#,Object Angle Y(obj),Uh)
`Calculates the height of the object in it's flight path.
objy# = Uy + (Uh + grav)
`Simulates The Increase Of Velocity Due To Acceleration Of Gravity
grav = grav + Ugrav
Position Object obj,objx#,objy#,objz#
Loop
That might not be too easy to understand, but that's the physics of it all.
Hopefully you can turn that into a function and create a good looking projectile exapmle
Hope I Helped...
Jess.

Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy