Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

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.

Parameter Type
from Vector3Like
to Vector3Like
solveFlightSecondsOptions SolveFlightSecondsOptions

number

const seconds = solveFlightSeconds(ballAt, landing, { gravity, clearance: { distance: 1, height: 2.48 }, minimumSeconds: 0.65, deltaSeconds: step.deltaSeconds });