CameraTour
Flies the camera over a list of points of interest and puts it back exactly where it was.
Camera state is captured once when a tour starts and restored when it ends, whether it finished on its own or was stopped early. That is the whole reason this exists rather than a hand-rolled tween: an interrupted tour is the common case, and it is the one that strands players in a scriptable camera.
You normally reach this through Cinematic.
Types
TourStop
interface TourStop {Hold: number?--
Seconds to linger here. Falls back to the tour default
Distance: number?--
How far back to sit. Falls back to the tour default
Height: number?--
How far above to sit. Falls back to the tour default
OnArrive: (() → ())?--
Runs once the camera settles on this stop
}
One point of interest. Every field except Target falls back to the tour's config, so a stop
only spells out what makes it different.
OnArrive is where you line up something with the camera, such as playing a sound or opening a
caption as the landmark comes into view.
CameraTourConfig
interface CameraTourConfig {Distance: number?--
Default distance from a target. Defaults to 13.2
Height: number?--
Default height above a target. Defaults to 9
Hold: number?--
Default seconds per stop. Defaults to 2.5
FocusDuration: number?--
Seconds to travel between stops. Defaults to 1.5
EasingStyle: Enum.EasingStyle?--
Easing for that travel
}Framing defaults. Pass it as Camera in TutorialConfig.
Properties
Completed
events
Fires when a tour ends, including when it was cut short by CameraTour:Stop or by a target
being destroyed. Firing on interruption too is what lets Advance be safe to attach.
Functions
create
constructorCreates a standalone camera tour. Tutorial.build already does this for you.
Errors
| Type | Description |
|---|---|
| "TutorialKit.CameraTour is client only" | Called from the server |
Play
Starts a tour, replacing any tour already running.
Focus
Shorthand for a tour with a single stop.
Stop
CameraTour:Stop() → ()Ends the tour early and restores the camera. Fires CameraTour.Completed.
IsPlaying
CameraTour:IsPlaying() → boolean--
Whether a tour is running
Destroy
lifecycleCameraTour:Destroy() → ()Stops the tour, restores the camera and releases the signal. Tutorial:Destroy already does this for you.