Hi, I recently wrote and open-sourced a Unity3D library & demo that shows how to plan and follow ballistic trajectories targeting a (moving) target under the influence of air resistance and (constant) wind. Trajectory plans can be calculated for a number of different desirable trajectory constraints like: given the initial speed, given the flight time, minimizing speed/energy, or (experimentally) even shooting over other obstacles in the scene. To do so, it doesn’t simulate the trajectory directly using Unity’s physics simulation but rather closely approximates it analytically using the formulas presented in my paper “Analytical Ballistic Trajectories with Approximately Linear Drag”. The code may be used freely for commercial and non-commercial projects.
A web player version of the demo can be found here.
See Planning ballistic trajectories with air resistance for games for more info.
Enjoy and let me know what you think!
Giliam de Carpentier