Learn to make cutscenes in unity3d by building a stealth Game.

Objective: Pan Mid Shot Camera by using Look at attribute of CM Virtual camera.

Before doing anything let's check the director's guide.

In the first step, create an empty game object renamed it Mid_Shot_Look_At, and position it near the head of the officer.

Select CM Mid shot, drag and drop the Mid_Shoot_Look_At to the field of look at attribute in the inspector.

Then take the Mid_Shot_Look_At game object and drag and drop it inside the sleeping guard cutscene.

I disable the canvas since it blocks me from seeing

To demonstrate this change the dead zone height and with to 4, the yellow dot represents the Mid_Shot_Look_At game object.

Note: as long the game object is within the dead zone camera will not move but when the Mid_Shot_Look_At game object moves out of the dead zone the camera will move.

Create an Animation track, then drag and drop Mid_Shot_Look_At in the animation track field it will ask you to create an animator on Mid_Shot_Look_At click it to create an animator on Mid_Shot_Look_At.

In the next step choose where to start the animation, and move the slider to where you want to start to pan down.

Now hit the record button and move the Mid_Shot_Look_At a little bit to create the starting frame, then move the Mid_Shot_Look_At down when he takes the card, and final move the Mid_Shot_Look_At up when he moves up to show Darren success take the card while the guard remains a sleep.

Note: you will notice snapping of the camera this is a default of look at attribute in cinemachine.

To fix the snapping of the camera change the value of vertical dumpingand horizontal damping of CM mid Shot to a higher number to get a smooth transition.

The Best practice when set damping is to set the value to equal.

Let's the final Result.

See you in the next article.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Suleiman Abdullah

Self taught Unity Developer, who is passion about making games ,and he loves Math For Game Development