Use the mouse to aim, Space to fire a projectile, WASD to move. Questions? Suggestions? Leave a comment!
This project uses a set of parametric equations to plot the (parabolic) path of a projectile. The equations look something like this: X(t) = cos(theta)*Vi*t Y(t) = 1/2*g*t^2 + sin(theta)*Vi Where: t = the parametric variable: time theta = the firing angle, Vi = initial velocity (this contains both horizontal and vertical velocities) g = gravitational acceleration At any given time 't', these two equations will give you the position of the projectile in the air, and you can also use them to plot the parabola. KhanAcademy Video: khanacademy.org/math/precalculus/parametric_equations/parametric/v/parametric-equations-1