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.