- #1
TheShermanTanker
- 13
- 4
The formula for the angle required for you to launch a projectile with a given velocity, gravity, distance and height difference is, taking g as gravity, v as total velocity, x as total distance on the horizontal plane and y as how high the target is above you (Negative value means the target is below you) is
tan-1((v^2 +/- square-root(v^4 - g(gx^2 + 2yv^2)))/gx). However, this assumes that the only resistive force is on the vertical plane (gravity) and that there is no horizontal resistance present (air resistance). However, the thing that I'm working on now has a hard-coded air resistance value of 1% of the object's current velocity that takes effect every 1/20 of a second (Basically imagine taking the object's velocity and multiplying it by 99% every twentieth of a second). Is there a way to factor air resistance in as well?
tan-1((v^2 +/- square-root(v^4 - g(gx^2 + 2yv^2)))/gx). However, this assumes that the only resistive force is on the vertical plane (gravity) and that there is no horizontal resistance present (air resistance). However, the thing that I'm working on now has a hard-coded air resistance value of 1% of the object's current velocity that takes effect every 1/20 of a second (Basically imagine taking the object's velocity and multiplying it by 99% every twentieth of a second). Is there a way to factor air resistance in as well?