We have redirected you to our new domain: store.godotengine.org. Please update your bookmarks!

Description
Changelog
Reviews

Ballistic Solutions

Library for calculating interception times, impact positions, and firing vectors, taking into account the velocities and accelerations of both projectile and target.


Table of Content

  1. Download
  2. Quickstart
  3. Warning
  4. Demo
  5. Contributing
  6. How it Works ?

Download


Quickstart

  1. Install the addon in Godot or reference the DLL in your C# project.
  2. In your scene, compute the vector to the target:
    var to_target = target.global_position - global_position
    
  3. Call best_firing_velocity_by_speed to get initial projectile velocity.
  4. Instantiate your projectile and assign velocity and acceleration.

Warning

Godot Physics Consideration:
Godot applies linear damping to physics bodies by default, which gradually reduces object velocity. This can significantly affect ballistic accuracy if not properly accounted for.

Recommendations:

  • Set default_linear_damp = 0 in the project settings, if you want pure projectile motion
  • Test thoroughly with your specific physics settings

Demo

You can test the addon using the included demo scene.


Contributing

  • Contributions are welcome. Open an issue or PR.
  • Demo scene is included for testing. Run it in Godot to validate behavior.

How it Works ?

  • The library sets up an interception equation between target and projectile motion and solves for t.
  • Each positive solution t corresponds to a valid hit time and gives a required initial velocity.
  • If no positive solutions exist, interception is impossible with current parameters.

Changelog for version v5.0.0

No changelog provided for this version.

Reviews (0)

Ballistic Solutions has no reviews yet.

Login to write a review.