Cutscenes
Cutscenes are animated sequences that advance the story and immerse players in the narrative. The horror game kit supports cutscenes, allowing users to arrange different elements that make up a scene, such as activation events, character animations, audio clips, and camera angles, in a timeline editor.
-
Activation track controls when to activate a clip.
-
Animation Track enables you to create an animation clip or add existing animation clips and make edits. For creating and editing animations in Horror Game Kit, it's recommended to use Animation Track to achieve the desired results.
-
Audio Track allows you to add existing audio clips and make edits.
-
Virtual camera track allows you to control camera views.
This enables precise control over the timing, sequencing, and blending of various elements to create compelling cinematic content.
To use cutscenes, you create cutscenes, add timeline tracks, and then configure cutscenes, which includes setting the Event Trigger component and the ending state.
Creating cutscenes with timeline
To create a cutscene, go to Scene Explorer, click the + icon, and choose Cutscene.
In the newly created cutscene, you will find the timeline editor in the center and its properties window on the right.
Note: When the timeline editor is open, you enter a Preview interface. In this interface, any changes made to objects that animation tracks are referencing are only for preview purposes and will not affect their current status in Scene Explorer. To exit the Preview interface, close the timeline editor or click the gear icon and unselect Preview on the editor.
Creating timeline tracks
With timeline tracks, creators manage the cutscenes with animation tracks, audio, and camera view to make up a scene. Different track types can be used together in one timeline to create complex and immersive scenes.
To create a timeline track, click + Add track in the timeline editor and select a type. Then you get an empty track of the desired type.
Animation tracks
Select Animation track and you get an empty animation track on the timeline.
You can add two types of animation clips to the tracks: pre-recorded clips from Asset Library, or clips that you create yourself by keyframe recording the movements of objects.
To use pre-recorded animation clips from Asset Library to animate your humanoid models:
-
Click the + icon to add an animation clip.
-
Drag the model to be animated to the track. You can continue to move the animation clip to the desired marker.
-
When you select the animation clip added, the Recorded window appears. In the Recorded window, choose the animation clip and set how to play the clip. If you're using a generic model, you should use the local animations that come with the model.
Property | Description |
---|---|
Name | A name for the animation track. |
Animation clip | The animation clip from Asset Library that plays when triggered. |
Ending state | Determines how it will behave once it reaches the end of the animation.
|
Speed | The playback speed of the selected animation clip. Ranges from 0.01 to 5. Default: 1. |
To create your animation clip by keyframe recording the movements of your model:
-
Drag the model to be animated to the empty track and click the dot to start recording.
-
To animate the model's movement, you keyframe its transform, rotation, and scale. For example, to record the CruelDoll's turn to face a different direction over 0.4 seconds, you move the playhead to the 0.4-second mark.
-
To preview, click the Play button or drag the playhead to move it between two points along the timeline.
-
Click the red dot to stop recording. Alternatively, click the More button, then select Stop recording.
Activation tracks
Activation tracks enable the appearance or disappearance of objects at specific points by adding keyframes and adjusting their status.
To create an activation track:
-
After selecting Activation track, you get an empty activation track.
-
Add a model to the scene.
-
Drag the model to the track. Then click the + icon to add an activation clip.
-
In the properties window, enter a name for the clip for quick management and select whether to activate the model at the time mark. This will determine when the model becomes visible and starts animating.
Note: Setting Post state to Inactive disables an object's collider and mesh. However, if you want to disable only the mesh or the collider, you can use an event trigger component instead.
-
Right-click on the clip and select Copy,then paste to the track. Repeat this process to create multiple keyframes in the timeline.
Audio tracks
Audio tracks allow an audio clip from Asset Library or that you upload to play at a certain point.
To create an audio track:
-
After selecting Audio track, you get an empty audio track.
-
If we want an audio clip to play when the player enters the trigger box of a ghost, we place the model CrazyDoctor to the scene.
-
Drag the model to the track and click + to add an audio clip. You can continue to drag the clip to the desired marker.
-
In the properties window, set the audio clip's properties.
- Name: A unique identifier of the audio clip for fast clip management.
- Audio File: Select the audio clip to play by choosing from the pre-recorded clips in Asset Library or by uploading your audio file. To upload a file, go to My Resource and select Uploaded files to begin uploading your audio in WAV, MP3, or OGG format. For more information, see Audio Importer.
- Volume: Controls the volume level of the audio clip. Ranges from 0 to 100% (default).
- Pitch: Controls the pitch of the audio clip. Ranges from -3 to 3. Default: 1.
Virtual camera tracks
The virtual camera track shapes the player's point of view (POV) and enhances the visual storytelling in your horror game. In the horror kit, the main camera represents the default POV that players see. In contrast, a virtual camera track specifies the position and orientation that the main camera should move to, rather than provide additional cameras.
To create a virtual camera track:
-
After selecting Virtual camera track, you get an empty virtual camera track.
-
Click + to add a virtual camera. You can also drag the camera clip to the desired marker.
-
Select the new clip in the timeline and edit its properties in the properties window.
Property Description Name A unique identifier of the camera for fast clip management. Camera object Controls the player's viewpoint by allowing the selection of either the default camera or a custom virtual camera. - Main camera: The default camera used to provide the player's point of view (POV). This camera typically provides a standard, first-person view of the game environment.
- Virtual camera: A custom camera that can be positioned and oriented in specific ways to allow for more control over the player's viewpoint. For example, a virtual camera might be used to provide a close-up view of a character or object, or to create a cinematic effect during a cutscene.
Follow Enable Controls whether to enable the camera to follow a specified object in the scene. Follow Object Determines a specified object for the virtual camera to follow. If the object moves, the POV dynamically follows. Offset The offset distance between the camera and the attached object. Look at Enable Controls whether to enable the camera to keep looking at a specified object in the scene. Look at Object Directs the virtual camera to focus on a particular object, allowing you to guide the player's attention to critical elements in the scene. FOV The field of view, controlling how much of the scene is visible. This is particularly useful for creating different visual effects and intensifying specific moments. Ranges from 30 to 60 degrees. Default: 60 degrees. Example of a main camera blended into a virtual camera both following and looking at a moving model:
Multiple tracks and clips
Blending two clips on the same track creates a smooth transition between clips. To achieve this, position a clip to overlap with an adjacent clip.
Attaching a clip to an adjacent clip results in an abrupt transition between them.
Multiple tracks on the same timeline will be played simultaneously.
The horror kit supports only one virtual camera track.
For animation tracks and activation tracks, if two clips of the same type control the same object at the same marker, and provide conflicting content, the clip on the first track overrides the clip on the second track. For example, if the first track contains a dancing animation clip, and the second track contains a running animation clip, the model will perform the dancing animation from the clip on the first track at the specified time.
Configuring cutscenes
Once you've finished setting up your timeline track, the next step is to determine how to trigger it in the cutscene's trigger action component and finish other settings.
-
Open the cutscene's properties window by clicking the More button.
-
In the Event Trigger component, for example, to trigger the timeline track when the player gets near an NPC, set Object to an NPC, Set Event to OnTriggerEnter, Action to the Object and Function to SetActive. For more information on the component, see Event Trigger.
-
In the Cutscene Settings component, select an option for Ending state. This option determines the status of the referenced object after all timeline tracks have finished playing: None restores the object to its status before the cutscene was played, Hold maintains the last status of the object as it was at the end of the cutscene, or Loop causes the cutscene to replay, returning the object to its initial status at the start of the cutscene.
-
Additionally, you can adjust the size and position of the trigger box around the NPC model to ensure that the player enters the trigger area as intended.
Example: Demo cutscene
Open the Packages window. Select All and search Demo cutscene. A demo cutscene is available for a quick look at how to combine all track types.
After playtesting, you can view the hierarchy of the cutscene in Scene Explorer.
Editing cutscenes with timeline
To start editing a cutscene, select the cutscene and click the More button to open its properties window.
To edit the timeline tracks, in the cutscene's properties window, click Edit Cutscene in the Cutscene Settings component to open the timeline editor.
To copy or delete a track, click the More icon in the timeline and click Copy or Delete.
Note that compared to version 1.0, Horror Game Kit 1.5 has the following changes to cutscenes:
-
The Trigger action component has been restructured to the Event Trigger component.
-
The Cutscene Play component no longer includes the Disable Interact setting, which previously blocked keyboard and mouse input in-game. A Global Action called BlockPlayerInput has been introduced as a replacement.