Skip to content

.solveLateralStatic()

Alex edited this page Aug 20, 2020 · 1 revision

Ballistics.solveLateralStatic(): u8

  • Public
  • Solve the firing arc with a fixed lateral speed. Vertical speed and gravity varies. This enables a visually pleasing arc.
  • Returns 1 if a valid solution was found, otherwise 0

Input Buffer

Index Value
0 X of a point that projectile will fire from
1 Y --"--
2 Z --"--
4 X of a point that projectile is trying to hit
5 Y --"--
6 Z --"--
3 scalar speed of projectile
7 height for projectile to peak at

Output Buffer

Index Value
0 X of firing solution
1 Y --"--
2 Z --"--
3 gravity necessary for projectile to hit precisely max height ( input[7] )