Projectile Toolkit 3

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!


🎮 Playable WebGL Demos

📚 Documentation


Projectile Toolkit is a physics toolkit that solves 3 key problems related to projectile motion: targeting algorithms for gravity-affected rigidbodies to hit the specified target, trajectory prediction algorithms that predict and render the trajectory of a rigidbody, and simulation of aerodynamic movement common in sports such as football, baseball, golf (draw/fade), etc.


Projectile Toolkit is extremly easy to use, and can be quickly integrated into existing projects.


🏆 Features:

- Flexible and Easy to Use, the core API is carefully-designed static methods, can be called directly from your scripts

- 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

- Plenty of inspirational demos (currently 6 demo scenes including 1 game scene), great for both learning this toolkit and quick prototyping

- Reusable demos, with "curated control methods" the demos are no longer just for demonstration purpose, you can control them with your own scripts or visual scripts.

- Full source code

- Detailed documentation


🎁 Bonuses:

Useful game toolkits such as:

★ explosion system

★ simple top-down character controller (character movement)



Technical details

-----------------------------


🥳 (New in 3.0) Aerodynamic Movement:

You can use this feature to simulate aerodynamic force seen in sports such as football, baseball, golf (draw/fade), etc. You can use it to simulate wind, air drag, or achieve creative weapon behaviors too.

- Offset the trajectory along both local X and local Z axis

- Trajectory prediction (via PEB Trajectory Predictor)

- Customizable callback when the projectile hit the target


🎯 Targeting algorithms:

- Compute the launch Velocity by: angle, height, time, a (coefficient of the quadratic function), speed

- Compute the launch angle by: speed

- Compute the max range by: elevation and speed


☄️ Trajectory prediction:

- Predict the position of the projectile at a given time

- Predict the whole trajectory points

- Test if a given velocity can let a projectile to hit a given target

- Predict the flight time

- Trajectory Predictor, an easy to use component to predict and render the trajectory

- PEB Trajectory Predictor, a brand new predictor based on the physics engine, accurate and performance friendly, supports bounces, drag, physics materials, etc., supports dynamic obstacles

- Fully customizable line style

- Two template styles provided: dash, slash


-----------------------------

Upcoming:

- Propulsion library