Intelligent Camera Switching Using Clearshot Cameras

Tyler Smallwood
3 min readDec 13, 2022

--

Objective: Introduce ClearShot Cameras.

Cinemachine has a specific Camera that will keep the player in view with stationary cameras. In our scene we will create a few walls, out of cubes, to act as an obstacle.

Now we can add the Clearshot Camera.

We will get a ClearShot1 Camera with a camera under. Inside the Clearshot we can add one more camera.

Next, we can set up the stationary Camera’s where we would like.

The next thing to do is to check that both cameras have the Collider Extension and has Avoid Obstacles enabled.

The final thing is to have the cameras look at the target. When using the ClearShot, the only place you need to assign the lookat is on the ClearShot and not every single camera.

With just this little guide you can set up a beautiful scene that have stationary cameras.

In the gif above, you can see that when a camera is on the Target and goes in a location that neither can see the target, the camera will move up. If the Collider’s Radius is small, the camera will clip into the walls. Just need to increase the Radius for that not to happen.

This was a small guide on ClearShot camera’s. This could be used for games that have a camera in one corner and each room has it’s own. Thank you for reading and have a wonderful day!

--

--

Tyler Smallwood
Tyler Smallwood

Written by Tyler Smallwood

I am passonate on learning to program and use Unity to become a skillful Unity Developer

No responses yet