Fixing the Starting Camera

Aligning the Main camera at the start of game play

Once we have our cutscene play, there is an known issue where the Main camera has realign itself with the last Cinemachine camera position. In this short article we will write a script which helps switch back the Main Camera to the starting point every time the cutscene is finished playing.

The Look At Script

In the Main camera component, we are going to be accessing the “Look At” script which was created to look at the player while the player moves around the scene. What we need to do is to give an new transform handle then in the void start method, replace the current transform position with the handlers. We also want the Main camera to update the rotation as well.

Save and head back into Unity where the script will now ask for an Transform object. In this slot we will drag and drop “Camera 1” so now when every time the game resets or an cutscene is finished playing, the camera is able to reset.

A Designer, an Illustrator and a massive tech geek aspiring to become a professional Unity Developer.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

7 Websites Every Developer Should Follow

Symfony 4.2 curated new features

3 Reasons Developers Love Flutter Mobile App Development

G Suite Email Migration Between Two G Suite Accounts

One day, you’re questioning what on earth will ever make you feel happy and fulfilled

Favoriting or Liking With Laravel and VueJS

Quick intro to classful IP addressing

Dev Log #07

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
Simon Truong

Simon Truong

A Designer, an Illustrator and a massive tech geek aspiring to become a professional Unity Developer.

More from Medium

Cleaning up the Homing Missile code

Bug Fix on Model Flip

My journey becoming a Unity game developer: 2.5D Infinite Runner-Ledge Grab System-Pt3

Creating a Retro Game Over Behavior