Planning ballistic trajectories with air resistance: A free Unity3D library & demo

Started by
-1 comments, last by gdecarp 9 years ago

I open-sourced a Unity3D library & demo that shows how to plan and move a ballistic projectile targeting a (moving) target under the influence of air resistance and (constant) wind. Trajectory plans can be calculated to hit a specific target with: a given initial speed, a given flight time, minimum initial speed/energy, or (experimentally) given the constraint to shoot over other obstacles in the scene, and more. 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". Because of this approach, it's fast, completely deterministic, exact and frame-rate independent.The code may be used freely for commercial and non-commercial projects.

ballistictrajectories-unity3d-screenshot

A web player version of the demo can be found here.
See http://www.decarpentier.nl/ballistic-trajectories for more info.

Enjoy!

Giliam

www.decarpentier.nl - developer blog | @decarpentier_nl - twitter

This topic is closed to new replies.

Advertisement