A brief look into Cameras and sequencer…

This was a small project I did in looking at different Camera viewpoints for both gameplay (such as changing from a third person to a side scroller) and looking at transitions between cutscenes. This was inspired by games such as Nier, where they often change the camera during gameplay to different viewpoints which are often seamless. Below is a short video of the project and a breakdown of how I achieved it.

The transitions and cutscenes as seen above are achieved by a mixture of sequencer and blending to camera’s that have different logic applied to them. For example, starting from the beginning there is a short cutscene that pans around the character and then blends into the player camera seamlessly, this was achieved by sequencer, which then blends into the player camera.

Using blueprints for the introduction transition, input was disabled for the player during this. When the sequencer finished it would fire off a event that enables input and the player can then move. Below is a example of the blueprint to achieve this.

There was a bit of manual work in getting the camera to lineup with the starting camera position from the character, which involved getting the camera location and copying this into the sequencer location on a keyframe. Though this isn’t ideal and something to look into in the future would be being able to dynamically set this through a BP so there is less manual work. Below is an example of the Intro shot in sequencer.

Showing some of the sequences I use in the project.

The sequencer has a few keyframes, including a fade in, slight field of view change and ‘pop’ at the end to indicate that the player now has control of the character, as well as the changes in the camera transform which pan around the character.

The next camera transition is a short cutscene of the viewpoint zooming in on a button which the player has to interact with to open the door. The camera also changes to a ‘tracking’ camera which is stationary but follows the movement of the player by rotation. To add to this, the controls also slightly change for the player, as it becomes based on where the camera position is so it isn’t confusing for the player.

This was achieved again through a mixture of blueprints and sequencer. Upon the character reaching the trigger volume, input is disabled and the sequence is played, and it then blends to another camera which is it’s own blueprint and separate to to the characters. To make sure I could reuse this logic if I needed to, I created a Base camera override which had some logic to blend to another camera, as well as a few variable settings. Off the base I created child blueprint classes with some more logic depending on what type of camera it was.

An example of how I created a base Override Blueprint to change camera, and then created child classes with their own logic depending on their purpose.

For example, in the screenshot above I have two children blueprint classes inherited from the base Camera override blueprint. One of them is a tracking camera that is stationary and simply ‘looks at’ the character as they move around the scene. The other has it’s own logic of moving along a spline. To begin with, I’ll show the Base Override camera BP.

In the Base Override camera I have some simple logic to blend to the BP camera from the normal character camera as shown above. This simply gets a reference to the character which I can use to switch the camera back to the original character camera when they leave the trigger box. I also added some logic which is dynamic and can be changed when placed in the world. For example, as seen above you can see the ‘Disable input during blend’ bool variable which, depending on the use case of the camera, can disable input during the blend/cutscene.

The above image is some more of the logic off the base when the player overlaps with the trigger box. I added in a option to play a cutscene via sequencer if it’s needed. I use this for zooming on the button which opens the door in the above gif. If it doesn’t need to place a cutscene, it simply blends to the next camera.

This is the final part of the logic. Depending on if they wanted a cutscene or not the logic will be different. For example if they did have a cutscene it sets the ‘IsCutscene’ to false so that if they go in and out of the collision box it doesn’t play the cutscene again. If they didn’t play a cutscene, it simply blends to the next camera. If it disabled input, it will re-enable it so the character can move after the transition. An issue with this would be if the cutscene needs to be played multiple times, or they need input to be disabled again during the blend after doing it once. This would just involve some more setup here that a user could access for more control.

Here is the variables I used to setup the Base camera override BP.

And then it translates to this when placed in the world, having a lot of options of where to place the camera at the beginning, as well as simple options such as blendtime when first stepping into the trigger box and blendtime when leaving.

Below are images of child classes of the Base override camera.

This is the tracking Camera override, there isn’t much logic to it except finding the look at rotation of the pawn and setting the rotation of the camera on tick so it tracks the character smoothly.

This camera override BP has a bit more logic to it. It moves the camera along a spline, based on the player progressing through his own individual spline.

Follow on from the spline BP

This is the rest of the camera spline override. This was used for the final part of the short video as seen below.

The controls change here and it turns into more of a side scroller. The player isn’t able to go forwards and backwards, only left and right relative to the screen. The characters location is also compared to a spline which communicates with the camera spline so I am able to achieve the above.