Day 57 — Finishing up the first cutscene

Connor Fullarton
5 min readMay 11, 2021

--

Hey and welcome!

It’s time to add in some panning for our mid shot now. With this one we’re going to make the camera pan down and then back up while Darren is swiping the keycard from the sleeping guard.

We’re going to be doing this one a little differently though, first off create an empty object that’s called something along the lines of Mid_Shot_Look_At. Position it so that it’s between Darren and the Guard if you’re looking at them form the Mid Shot camera’s point of view.

I went for -5, -2 and -113 as my position for the object. Next click on your Mid Shot camera and then drag and drop your new object into the Look At property in the camera’s inspector. To get a good look at what exactly we’ve done here, click on the solo button so that you’re seeing the Mid Shot camera’s angle in the game view and then click on the padlock in the top right of the inspector so that we can keep it that way. Next simply move about your new object in the scene view and watch the magic happen.

What’s happening here is that the dead zone is keeping the object within it, so wherever we move the dead zone follows along with the rest of the camera. Time to get busy now, create a new animation track in your timeline and drag in the Look At object and then record the first frame up by Darren’s head.

Then move along the timeline until Darren’s hand has extended fully to the keycard. Once there you can move your Look At object so that it moves the dead zone of the camera to look at the keycard in question. Move along the timeline again with that keyframe set until you get to the point that Darren is standing upright and move the Look At object so that it’s level with his face again.

You may notice that the movement snaps pretty quickly here and it’s a little jarring. In order to resolve that you can go to the aim settings in the Mid Shot camera and adjust both dampening options to an appropriate number, I went for 8 on both. With that in place you’ll see that the camera is a bit more steady now in the shot compared to how quickly the Look At object is moving.

That’s looking pretty good now I think! Before we part ways it’s time to add that last bit of flair to our cutscene start with a fade in effect. In the hierarchy create a new Image UI element and then click the bottom right option in the anchor menu and set all the values to 0.

With that done you’ll now have a white square covering your whole game view, change the colour to black and we can move onto making use of this UI element. Create a new animation track in the timeline and add the image object to it. Move your timeline to the first frame and then hit the record button, adjust the colour and put it back to black in order to create that first keyframe.

Now move the timeline to the half a second mark at about 0.3 and then alter the alpha channel of your image colour so that it’s all the way down to 0 which will cause the colour to become transparent to the point it’s not visible anymore.

Now you’ve got a pretty cool fade effect for the start of the cutscene, you can also do the same for the end of the cutscene which will just be the reverse of what we’ve done here.

Last thing we’re going to do for our cutscene is to make the card object attached to the sleeping guard disappear. To do this will make use of something called an activation track in the timeline, go ahead and create that and you should see something like this.

That Active bar you see there can be adjusted in position and length along the timeline, this particular one runs from 0 to 3 seconds. While the timeline is within this active bar the object attached to it will remain in the scene. Once the timeline goes beyond the bar though the object’s active status is then unchecked and the object vanishes from the scene.

If you remember the 2D Space Shooter this is the equivalent of changing the value within the SetActive(). So if you pass in your card object and set the Active bar to run until the 3 second mark or whenever Darren’s arm is fully extended you’ll end up with this.

I don’t know about you but that makes life a lot easier and it’s very easy to implement as well!

That’s everything with this cutscene now and you now have the knowledge to form your own cutscenes in your games. Here’s this particular cutscene in all its glory:

--

--

Connor Fullarton
Connor Fullarton

Written by Connor Fullarton

Hey and welcome! My name is Connor and my goal here is to put out a daily post for a full year about my game development journey.

No responses yet