You want the gradient at any point of the curve traced by the shell as it zooms through the air.
If it leaves the ground with horizontal velocity H, and vertical velocity V,
then by my reckoning the angle you're looking for at any point on its trajectory is
where V,H are the initial velocities as already stated,Code:Math.atan(V/H - g*x/Math.pow(H,2))
g is the acceleration due to gravity (roughly 10 metres per second, per second)
and x is the horizontal distance travelled since being fired.
My guess is you're going to have to play around with the value you give g until you get something that 'looks right' but hopefully this will give you enough to make a start.
EDIT: That's the angle between the trajectory and the horizontal by the way.




Reply With Quote