Trajectory Lib

An asset by nsrosenqvist
The page banner background of a mountain and forest
Trajectory Lib thumbnail image
Trajectory Lib thumbnail image
Trajectory Lib thumbnail image
Trajectory Lib image holder but it is empty

Quick Information

0 ratings
Trajectory Lib icon image
nsrosenqvist
Trajectory Lib

A library that provides tools to work with, and calculate, 3D ballistic trajectories. It's a collection of helpers that are designed to cover most use-cases requiring pre-calculations of velocity, time, position or collisions.

Supported Engine Version
3.4
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Trajectory Lib

README Screenshot of range calculation demo

This is a utility library that provides tools to work with, and calculate, 3D ballistic trajectories. It's a collection of helpers that are designed to cover most use-cases requiring pre-calculations of velocity, time, position or collisions.

Credits

Much of the code is based on the trajectory solving logic of Forrest Smith's C# library (0.1.0). Refer to his blog for extended explanations on how to use the different techniques in your project. One method is also ported over from Miziziziz's Godot3DProjectileSolver project.

License

MIT

Usage

Most techniques are explained in this blog post. The code is well documented so refer to the file for how to use the API.

Similarly to Godot's intersect_ray, most methods return a Dictionary with the relevant information of the solution. A solution object has the following keys set:

  • position: The calculated point of impact.
  • time: Duration of travel until the point of impact.
  • gravity: Gravity used for solution—the methods using a fixed lateral speed return a variable gravity.
  • velocity: The required velocity to reach the point of impact.

A library that provides tools to work with, and calculate, 3D ballistic trajectories. It's a collection of helpers that are designed to cover most use-cases requiring pre-calculations of velocity, time, position or collisions.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Trajectory Lib icon image
nsrosenqvist
Trajectory Lib

A library that provides tools to work with, and calculate, 3D ballistic trajectories. It's a collection of helpers that are designed to cover most use-cases requiring pre-calculations of velocity, time, position or collisions.

Supported Engine Version
3.4
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers