Hybrid Real-Time Ballistics in Unity: Adaptive Integrators, Layered Wind and Thrust

Main Article Content

Namig Huseynov, Fuad Dadashov

Abstract

Accurate real-time projectile simulation is critical for virtual-reality trainers, serious games, and scientific simulations. Most current game engines approximate trajectories using parabolic models or fixed-drag tables, neglecting key effects such as layered wind, altitude-dependent air density, and sustained booster thrust. We introduce an open-source Unity plug-in that models four major external forces—variable gravity, quadratic drag, stratified wind, and continuous thrust—within a hybrid integrator that dynamically switches between semi-implicit Euler, fixed-step RK4, and adaptive Fehlberg RKF45. Five benchmark scenarios executed on a desktop. Across five benchmark scenarios on desktop hardware, our method maintains a root-mean-square error below 0.02 m for drag and wind, and ≤ 0.12 m for RPG-7-class thrust, compared to an eighth-order reference. It achieves real-time performance with 200 FPS (Euler/RK4) and 94 FPS (RKF45). Stress tests with 10,000 concurrent projectiles show linear performance scaling and zero managed-heap allocations. This plug-in bridges real-time simulation and research-grade ballistics, enabling cost-effective, high fidelity VR training for defense and educational applications.

Article Details

Section
Articles