solveFlightSeconds
solveFlightSeconds(
from,to,solveFlightSecondsOptions):number
The shortest flight time from from to to whose path clears
clearance, never less than minimumSeconds: the time to give
solveFlight. A clearance outside the path, behind the start or past
the target, asks for nothing; one at an end of the path above that end
throws, since no arc clears it. Exact on every world.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
from |
Vector3Like |
to |
Vector3Like |
solveFlightSecondsOptions |
SolveFlightSecondsOptions |
Returns
Section titled “Returns”number
Example
Section titled “Example”const seconds = solveFlightSeconds(ballAt, landing, { gravity, clearance: { distance: 1, height: 2.48 }, minimumSeconds: 0.65, deltaSeconds: step.deltaSeconds });