flight
flight(
flightOptions?):FlightMotion
A flight for a kinematic body’s motion: the ball’s path between its
launches, computed from the tick on the room and every page alike, so
it needs no stream but a record per launch. Queries meet the ball, it
pushes nothing, and it meets only its bounceOff and landOn boxes,
passing through every other collider. As Unreal’s projectile movement,
narrowed to boxes so every world agrees to the bit.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
flightOptions |
FlightOptions |
Returns
Section titled “Returns”Example
Section titled “Example”body: { bodyType: RigidBodyType.Kinematic, motion: flight({ gravityScale: 1, drag: 0.02, restitution: 0.4, bounceOff: [net] }) }