Using the Camera Triggers in Unity

This tutorial will cover how to use camera triggers to adjust your camera angles in Unity. Do to this you should already have your camera triggers and your camera angles set up. Create a script called CameraTrigger. Assign it to all of your camera triggers. Also make sure all of your camera triggers have a rigid body and uncheck Use Gravity on them. Also Make to to check Is Trigger. Otherwise they will not actually trigger.

Open the script you just created. You will not need the start or update functions so you can remove those. Add an OnTriggerEnter function and check if the other collider has the Player tag.

Next, create a variable that will hold the transform for the camera position you want to switch to.

Then assign the cameras to each of your triggers.

Next in your script update the main camera to match the transform and rotation of your camera transform that is attached to the trigger.

Now as your player moves through the game the camera will adjust as you move through the triggers.