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 )
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: