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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
from |
Vector3Like |
to |
Vector3Like |
solveFlightOptions |
SolveFlightOptions |
Returns
Section titled “Returns”Vector3
Example
Section titled “Example”launchFlight(step, ball, solveFlight(ballAt, landing, { seconds: 0.65, gravity, deltaSeconds: step.deltaSeconds }));