(Note: Formerly known as:
Projectile Toolkit - Targeting and Trajectory Prediction
Projectile Toolkit 3
We intended to minimize name changes, but the features kept expanding!)
Want to implement game mechanics based on projectile motion? Want enemy AI to use ranged weapons such as cannons, rocks or arrows to accurately hit targets? Want to have full control over jump motion of objects in games or animations without losing their physical properties? This toolkit has got you covered!
🕹️ WebGL Demos
📚 Docs
Projectile Toolkit is an advanced physics toolkit that helps you solve problems related to targeting (ballistics), projectile data prediction, trajectory prediction, and projectile aerodynamics.
Projectile Toolkit is extremly easy to use, and can be quickly integrated into existing projects.
🏆 Features:
- Flexible and easy to use: the low-level APIs are carefully-designed static methods; the high-level features are carefully designed to be used with no code or with simple code
- Super fast: most algorithms don't even touch trigonometric functions
- Works in both 3D and 2D (works in 2D if only your game treats y as up axis)
- Works on all build platforms
- Inspirational demos: great for both learning this toolkit and quick prototyping
- Full source code
- Detailed documentation
🎁 Bonuses:
Useful game toolkits such as:
★ Explosion system
★ Top-down character controller (Character Movement Kit)
-------------------------
Technical details
Projectile Toolkit provides templates and tools related to:
Targeting
Let gravity-affected rigidbodies to hit the specified target
Prediction
Compute various projectile data;
Trajectory prediction and rendering
Projectile Aerodynamics
Handle curved trajectories seen in boomerang, football, golf (draw/fade), etc. (and still hit the specified target)
Propulsion
Coming soon!
🎯 Targeting
• Compute the launch velocity by any of the following:
- angle
- height
- time
- a (coefficient of the quadratic function)
- speed
• Compute the launch angles by: speed
• Compute the max range by: elevation, speed
☄️ Prediction
• Predict various projectile data (API libarary):
- Projectile's position at a given time
- Whole trajectory points
- Test if a given velocity can let a projectile to hit a given target
- Flight time
• Trajectory prediction and rendering:
- Trajectory Predictor (math based)
- PEB Trajectory Predictor (physics engine based)
- Fully customizable line style
- Two template styles provided: dash, slash
- Compare the 3 Systems of Trajectory Prediction
⚽ Projectile Aerodynamics
• Mimic pro-level curve shots in football, baseball, golf, etc.
• Simulate wind and air drag
• Implement creative weapons such as boomerangs
-------------------------
Roadmap
- Propulsion Toolkit (v3.2)
- Custom gravity direction (v4.0)