Ballistic Solutions (GDScript, C#) 4.0.1 Scripts 4.0 Community
Submitted by user neclor; MIT; 2026-01-03
Library for calculating interception times, impact positions, and firing vectors, taking into account the velocities and accelerations of both projectile and target.
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` 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
View files Download Submit an issue Recent Edits