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

solveFlight

solveFlight(from, to, solveFlightOptions): Vector3

The velocity that launches a flight from from to to in seconds, rounded up to whole ticks, as flight steps it: from + - * / alone, so every world that solves the same numbers launches the same ball, and it stands on to on the last tick. No drag. Written in place, and solveFlightSeconds writes over it, so copy what you keep. As Unreal’s SuggestProjectileVelocity, solved by time rather than by speed.

Parameter Type
from Vector3Like
to Vector3Like
solveFlightOptions SolveFlightOptions

Vector3

launchFlight(step, ball, solveFlight(ballAt, landing, { seconds: 0.65, gravity, deltaSeconds: step.deltaSeconds }));