readFlight
Call Signature
Section titled “Call Signature”readFlight(
step,ball):Readonly<FlightState> |null
Where ball’s flight is at the step’s tick, or, outside a step, at
tick: its position, velocity, the tick it landed and whether it is
held, written in place, so read it at once. Null for an entity whose
body has no flight. Exact on the room and every page, a re-run
included.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
step |
SystemStep |
ball |
Entity |
Returns
Section titled “Returns”Readonly<FlightState> | null
Example
Section titled “Example”const { position, landedTick } = readFlight(step, ball) ?? {};Call Signature
Section titled “Call Signature”readFlight(
world,ball,options):Readonly<FlightState> |null
Where ball’s flight is at the step’s tick, or, outside a step, at
tick: its position, velocity, the tick it landed and whether it is
held, written in place, so read it at once. Null for an entity whose
body has no flight. Exact on the room and every page, a re-run
included.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
ball |
Entity |
options |
{ tick: number; } |
options.tick |
number |
Returns
Section titled “Returns”Readonly<FlightState> | null
Example
Section titled “Example”const { position, landedTick } = readFlight(step, ball) ?? {};