Skip to main content
The Flyby namespace lets you take control of the camera to create cinematic sequences. You can build a multi-step flyby by composing a list of FlybyEvent objects and passing them to Flyby.start(), or trigger a quick zoom-in on a specific block with Flyby.startZoomAt(). The camera moves smoothly between positions and returns to the player when the sequence ends.

Functions

Flyby.start

Starts a flyby sequence made up of one or more FlybyEvent steps. The camera moves through each event in order.
Pass an array (Lua table) of FlybyEvent objects. You create each event using the static factory methods on the FlybyEvent class described below.

Flyby.startZoomAt

Starts a quick zoom-in, hold, and return sequence focused on a specific location. You can identify the target by a BlockSlot object or by raw x, y, z coordinates.

FlybyEvent Class

A FlybyEvent represents one step in a flyby sequence. You never construct events with FlybyEvent.new; instead you use the static factory methods below. All factory methods return a FlybyEvent that you add to the array passed to Flyby.start().

Properties

Instance Methods

FlybyEvent:toFlybyEvent

Converts this object to a FlybyEvent. Useful when you hold a subclass reference and need to pass a base FlybyEvent to an API that requires it.

Factory Methods

FlybyEvent.rawMoveTo

Moves the camera to an exact world position and rotation.

FlybyEvent.moveTo

Moves the camera to a block face, identified either by a BlockSlot or by grid coordinates.

FlybyEvent.moveToBall

Moves the camera to follow the ball at the given look position.

FlybyEvent.wait

Holds the camera in place for the specified duration.

FlybyEvent.message

Displays an overlay message during the flyby, with an optional background color.

FlybyEvent.script

Runs a Lua closure at this point in the sequence. Use it to trigger sounds, signals, or any side effect.

Usage Examples

Quick zoom-in on a block

Multi-step cinematic sequence