Deflection (ballistics) Formula

An asset by neclor
The page banner background of a mountain and forest
Deflection (ballistics) Formula hero image

Quick Information

0 ratings
Deflection (ballistics) Formula icon image
neclor
Deflection (ballistics) Formula

Function on GDScript for calculating the vector of an “intercepting” shot, considering “external” accelerations.UsingFunction take bullet speed, target position, target velocity and optional(target_acceleration, bullet_acceleration), and returns an vector of length bullet speed.If a hit is not possible, the function will return a zero vector.WarningAlso used an addon for solving equations. (https://godotengine.org/asset-library/asset/2998)Functions in current versionvector2(bullet_speed: float, target_position: Vector2, target_velocity: Vector2, target_acceleration: Vector2 = Vector2.ZERO, bullet_acceleration: Vector2 = Vector2.ZERO) -> Vector2vector3(bullet_speed: float, target_position: Vector3, target_velocity: Vector3, target_acceleration: Vector3 = Vector3.ZERO, bullet_acceleration: Vector3 = Vector3.ZERO) -> Vector3

Supported Engine Version
4.0
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
6 months ago
Git URL
Issue URL

Function on GDScript for calculating the vector of an “intercepting” shot, considering “external” accelerations.

Using
Function take bullet speed, target position, target velocity and optional(target_acceleration, bullet_acceleration), and returns an vector of length bullet speed.
If a hit is not possible, the function will return a zero vector.

Warning
Also used an addon for solving equations. (https://godotengine.org/asset-library/asset/2998)

Functions in current version
vector2(bullet_speed: float, target_position: Vector2, target_velocity: Vector2, target_acceleration: Vector2 = Vector2.ZERO, bullet_acceleration: Vector2 = Vector2.ZERO) -> Vector2
vector3(bullet_speed: float, target_position: Vector3, target_velocity: Vector3, target_acceleration: Vector3 = Vector3.ZERO, bullet_acceleration: Vector3 = Vector3.ZERO) -> Vector3

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
Deflection (ballistics) Formula icon image
neclor
Deflection (ballistics) Formula

Function on GDScript for calculating the vector of an “intercepting” shot, considering “external” accelerations.UsingFunction take bullet speed, target position, target velocity and optional(target_acceleration, bullet_acceleration), and returns an vector of length bullet speed.If a hit is not possible, the function will return a zero vector.WarningAlso used an addon for solving equations. (https://godotengine.org/asset-library/asset/2998)Functions in current versionvector2(bullet_speed: float, target_position: Vector2, target_velocity: Vector2, target_acceleration: Vector2 = Vector2.ZERO, bullet_acceleration: Vector2 = Vector2.ZERO) -> Vector2vector3(bullet_speed: float, target_position: Vector3, target_velocity: Vector3, target_acceleration: Vector3 = Vector3.ZERO, bullet_acceleration: Vector3 = Vector3.ZERO) -> Vector3

Supported Engine Version
4.0
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
6 months 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