Data Realms Fan Forums
http://45.55.195.193/

Ballistic Trajectory
http://45.55.195.193/viewtopic.php?f=73&t=15590
Page 1 of 1

Author:  zalo [ Sat Jun 27, 2009 4:35 pm ]
Post subject:  Ballistic Trajectory

Code:
Angle = math.atan(math.pow(Vel, 2))±(math.sqrt(math.pow(Vel,4)-SceneMan.GlobalAcc.Y(SceneMan.GlobalAcc.Y)(math.pow(target.Pos.X,2))+2(target.Pos.Y)(math.pow(Vel,2)))/(SceneMan.GlobalAcc.Y)(target.Pos.X)


Could this work if Vel was the Velocity that the projectile was shot out at,
the Target was within range, and Angle was the angle that the canon was shot at?
Or did I do it wrong? I'm not good with complex equations like this.


By the way, I based it off this:
http://en.wikipedia.org/wiki/Trajectory_of_a_projectile#Angle_.CE.B8_required_to_hit_coordinate_.28x.2Cy.29

Image :?

Author:  cambiogris [ Sat Jun 27, 2009 5:20 pm ]
Post subject:  Re: Ballistic Trajectory

assuming CC measures length in meters, velocity in m/s, and acceleration in m/s^2, it should work

substitute meters with any other unit of length of course, just as long as these three are proportional in the same way

edit: you need the arctan, not the tangent

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/