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