sm.projectile.solveBallisticArc

Calculate the ballistic arc of a projectile. There are two potential solutions to the problem.

Kind: Function

Environments: Game

Game

sm.projectile.solveBallisticArc( firePos, targetPos, velocity, gravity )

Open the full Game reference

One with a low fire angle and one with a high fire angle. Solutions can be nil if no solution is found.

Parameters:

Name Type Description
firePos Vec3 The position the projectile is fired from.
targetPos Vec3 The position the projectile should hit.
velocity number The fire velocity of the projectile.
gravity number The gravity ( positive down ).

Returns:

Type Description
Vec3 The low angle solution
Vec3 The high angle solution.