View unanswered posts | View active topics It is currently Fri Dec 27, 2024 6:56 am



Reply to topic  [ 2 posts ] 
 Ballistic Trajectory 
Author Message

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post 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 :?


Sat Jun 27, 2009 4:35 pm
Profile WWW
User avatar

Joined: Tue Apr 10, 2007 10:32 pm
Posts: 830
Reply with quote
Post 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


Sat Jun 27, 2009 5:20 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.037s | 13 Queries | GZIP : Off ]