# This script controls our movie camera using { /Fortnite.com/Devices } using { /Verse.org/Simulation } using { /UnrealEngine.com/Temporary/Diagnostics } camera_controller := class(creative_device): # This is a variable. It holds the cinematic sequence device. # Wire it in the UEFN editor's device properties panel. @editable my_camera : cinematic_sequence_device = cinematic_sequence_device{} # This function runs when the game starts. OnBegin() : void = # Wait for 2 seconds. Sleep(2.0) # Tell the camera to play its sequence (activating camera and DOF settings). # Note: cinematic_sequence_device exposes Play() to trigger the sequence; # fine-grained focus distance is authored on the sequence track in the editor. my_camera.Play() # Wait a bit more. Sleep(1.0) # Stop the current sequence and restart to simulate a focus shift. # To change focus distance values, edit the Camera Cut / DOF tracks # inside the Cinematic Sequence asset in the UEFN sequencer editor. my_camera.Stop() my_camera.Play()