Cinematic
Flies the camera over one or more points of interest and puts it back where it was.
Camera state is captured when the tour starts and restored whether the tour finished or was interrupted, which is what keeps a player from being stranded in a scriptable camera when a step ends early.
Step.new(1, {
Cinematic.focus(castleGate, { Hold = 3, Advance = true }),
})
Types
CinematicOptions
interface CinematicOptions {Hold: number?--
Seconds to linger on each stop
Distance: number?--
How far back the camera sits
Height: number?--
How far above the target it sits
Advance: boolean?--
Move to the next step when the tour ends
}Framing for the tour, plus what happens when it ends.
Finished and Advance fire on the tour ending, which includes being cut short, so a player
who leaves the step is never left waiting on a callback that will not come.
Functions
focus
constructorFlies the camera to one point of interest and back.
The most common opening for a tutorial: show the player where they are before asking them to do anything.
Step.new(1, {
Cinematic.focus(spawnStatue, {
Hold = 2.5,
Distance = 40,
Height = 12,
Advance = true,
}),
})
tour
constructorFlies the camera over several points in order.
Each stop can override the shared framing, so one landmark can sit closer than the rest:
Cinematic.tour({
{ Target = shopModel.PrimaryPart, Hold = 2 },
{ Target = arenaGate, Hold = 3, Distance = 60 },
{ Target = questBoard },
}, {
Distance = 35,
Advance = true,
})
TIP
If a stop's target is destroyed mid-tour the tour stops there and the camera is restored, rather than the player being stuck watching nothing.