How to Get Side of Camera in Unity

Camera
By Maya Collins June 1, 2026
Disclosure: As an Amazon Associate, I earn from qualifying purchases. This post may contain affiliate links, which means I may receive a small commission at no extra cost to you.

Splitting the screen in Unity feels like trying to wrangle a slippery eel in a bathtub sometimes, doesn’t it? I remember one particularly late night, staring at my monitor, convinced I’d need to write a custom shader just to get two cameras side-by-side. Spent about $150 on assets that promised to simplify it, only to find they were glorified prefabs with confusing scripts.

Turns out, the solution for how to get side of camera in unity is embarrassingly simple, once you stop overthinking it. It’s less about fancy code and more about understanding Unity’s core camera components.

My initial frustration stemmed from a bad assumption: that anything beyond a single main camera required a degree in rocket science. That couldn’t be further from the truth.

This whole process taught me a valuable lesson about not letting marketing buzzwords dictate my understanding of a tool.

Making More Than One Camera Play Nice

Look, the default Unity setup is built for one glorious main camera, right? You slap it in the scene, point it somewhere, and boom, you’re playing. But what about split-screen multiplayer? Or that fancy picture-in-picture effect for a tactical overview? That’s where things get interesting, and frankly, a little fiddly if you’re not prepared.

You’re going to need more than one camera object. This seems obvious, but I’ve seen people try to manipulate a single camera’s viewport rect to do impossible things. Don’t do that. Create a second, or third, or fourth camera as you would normally. Just go to GameObject -> Camera in the editor. These new cameras are your workhorses for any multi-camera setup.

The Secret Sauce: Viewport Rect, Not Magic

So, you’ve got your cameras. Now what? The magic, if you can call it that, lies in the ‘Viewport Rect’ property found on the Camera component itself. This is what tells Unity exactly where on the screen that camera’s output should be drawn. It’s a set of four floating-point numbers: X, Y, Width, and Height. They all range from 0 to 1, representing percentages of the screen’s resolution.

Think of it like painting on a canvas. X is how far from the left edge you start, Y is how far from the bottom edge you start, Width is how wide your brush stroke is, and Height is how tall it is. It’s a surprisingly intuitive system once you stop picturing complex math equations.

For a classic two-player split-screen, where each player gets half the screen, you’d set up your first camera (Player 1) with a Viewport Rect of (0, 0, 0.5, 1). This means it starts at the bottom-left corner (0, 0) and takes up the full height (1) but only half the width (0.5). The second camera (Player 2) would then get (0.5, 0, 0.5, 1), starting halfway across the screen and also taking up half the width and full height. Simple, right? (See Also: How To Reset Zosi Camera System )

I spent a solid two hours once, trying to get two cameras to sit side-by-side, convinced I needed to mess with render textures or some other arcane technique. It all came down to realizing I could just adjust the X and Width values on the Viewport Rect. Felt like a complete idiot, but hey, that’s how you learn.

Handling Depth and Order

With multiple cameras, especially if they’re overlapping or if one is meant to be on top (like a UI camera over a gameplay camera), the ‘Depth’ property becomes your best friend. This is a simple integer value. The camera with the highest depth value will be rendered on top of cameras with lower depth values. It’s like stacking transparent sheets of plastic; the one on top covers the ones below it.

For a typical game, your main gameplay cameras might have a depth of 0 or 1. A UI camera that you want to always be visible, showing scores or health bars, should have a significantly higher depth, maybe 10 or 20. This ensures your UI elements are always rendered last, on top of everything else.

Sometimes, you’ll want to render a specific camera first. Imagine a cinematic scene where a static camera shows a wide shot, and then a player-controlled camera zooms in. You’d give the wide shot camera a lower depth than the player camera so it renders behind it.

Why People Get This Wrong (and What to Do Instead)

Everyone says you just need to use multiple cameras and tweak the Viewport Rect. I disagree, and here is why: While technically true, this advice often glosses over the *practical* implications. Simply slapping cameras down and adjusting rects leads to issues with aspect ratios, scaling, and managing input if you’re doing split-screen multiplayer. You’re not just drawing pixels; you’re setting up entire player experiences.

The most common mistake I see, and one I made myself for ages, is forgetting about the camera’s ‘Projection’ setting. If you have one camera set to ‘Perspective’ and another set to ‘Orthographic’, they won’t look right when placed next to each other unless you’ve specifically designed for that kind of dissonance. For most standard split-screen setups, both cameras should share the same projection type.

Another trap is not accounting for the main display’s aspect ratio. If you have a wide screen and you’re trying to split it down the middle for two players (0.5 width each), it works fine. But if you have a vertical split (0.5 height each) on a wide monitor, you’ll end up with two squashed, letterboxed views unless you adjust the rects to compensate. It’s like trying to pour a gallon of water into a pint glass – you need to manage the space effectively.

Honestly, the sheer number of YouTube tutorials that just show the Viewport Rect adjustment and then stop, without mentioning input handling or aspect ratio correction, is astonishing. It’s like teaching someone how to hold a hammer but never showing them how to hit a nail straight. (See Also: How To Set Up Trace Camera )

A Real-World Scenario: Tactical Overview Camera

Let’s say you’re building a strategy game. You have your main game view, which is a standard perspective camera following the player’s forces. Now, you want a smaller, fixed, top-down orthographic camera in the corner, showing a map-like overview of the entire battlefield. This is a perfect use case for side-by-side camera techniques, even if one is small and in a corner.

1. **Create the Overview Camera:** Add a new Camera GameObject. Name it something clear like ‘OverviewCamera’.
2. **Set Projection:** Change its Projection property in the Inspector to ‘Orthographic’.
3. **Position and Rotate:** Place this camera high above your scene, looking straight down (Rotation X=90, Y=0, Z=0). Adjust its Orthographic Size to frame the area you want to see.
4. **Configure Viewport Rect:** This is the key. For a small window in the top-right corner, you’d set its Viewport Rect to X=0.75, Y=0.75, Width=0.25, Height=0.25. This puts it in the last quarter of the screen.
5. **Set Depth:** Give this ‘OverviewCamera’ a higher Depth value than your main gameplay camera to ensure it’s rendered on top. Maybe Depth 10.
6. **Test:** Run the game. You should see your main game view, with the smaller top-down map in the corner. If the map is too big or too small, adjust the Width and Height of its Viewport Rect. If it’s not in the right corner, tweak X and Y. The whole process took me about five minutes the first time I did it, after wrestling with it for hours previously.

Input Management for Split-Screen

This is where things get genuinely tricky and where many tutorials just… stop. If you’re doing split-screen multiplayer, each player needs their own input. You can’t just let both Player 1 and Player 2 control the same character using the same keyboard input. That’s a recipe for chaos.

Unity’s new Input System is your friend here, but it’s a bit of a learning curve. You’ll need to create separate Input Actions for each player. Then, when you’re processing input, you’ll need to check which player’s input you’re currently reading and apply it to their specific character or camera.

For instance, if Player 1 uses the left half of the screen and Player 2 uses the right, you might assign Keyboard and Mouse 1 to Player 1 and Keyboard and Mouse 2 (or a gamepad) to Player 2. This is done within the Input System’s Player Input component settings or by programmatically assigning control schemes.

The old Input Manager (Input.GetAxis, etc.) is even more of a headache for this, often requiring manual checks of joystick IDs or complex script work to differentiate inputs. If you’re starting a new project, bite the bullet and learn the new Input System. It’s designed for these sorts of complex control schemes, including multiple players on the same machine.

Camera Orthographic vs. Perspective: A Quick Recap

Understanding the difference is key when setting up multiple cameras, especially if they’re meant to work together or on different parts of the screen. A perspective camera mimics how humans see, with objects getting smaller the further away they are, creating a sense of depth. It’s what you’ll use for most 3D games where realism matters.

An orthographic camera, on the other hand, shows objects at a constant size regardless of distance. It’s like looking at a blueprint or a map. This is why it’s perfect for top-down strategy views, 2D games, or UI elements where consistent sizing is important. Mixing them incorrectly can make your scene look jarring and unprofessional. (See Also: How To Factory Reset Hikvision Camera )

Camera TypeUse CaseVisual EffectOpinion/Verdict
PerspectiveMost 3D games, realism simulationObjects shrink with distance, depth of fieldThe go-to for immersive 3D worlds. Essential for a sense of scale.
OrthographicStrategy games, 2D games, UI overlaysObjects maintain size regardless of distance, flat appearanceGreat for clear, functional views where depth isn’t the priority. Use for maps and UI.

How Do I Make a Camera Follow a Player in Unity Split-Screen?

You’ll typically have a script attached to the camera that updates its position based on the player character’s transform. For split-screen, this script needs to know *which* player character to follow. Often, you’ll assign a specific player GameObject to the camera’s script. The Viewport Rect ensures it only draws on its designated half of the screen, but the follow script itself is player-specific.

Can I Use Multiple Cameras for a Single Player’s View?

Yes, absolutely. You might use a main camera for gameplay and a second, smaller camera with a higher depth to show a minimap or a character portrait. The key is managing their Viewport Rects so they don’t overwrite each other unintentionally and setting their depths correctly so the desired camera renders on top.

What’s the Difference Between Camera Depth and Viewport Rect?

The Viewport Rect defines *where* on the screen the camera renders (its position and size). The Depth defines *when* the camera renders relative to other cameras. If two cameras have overlapping Viewport Rects, the one with the higher Depth will be drawn on top of the other. Think of Depth as layer order and Viewport Rect as canvas placement.

Final Verdict

So, when it comes to how to get side of camera in unity, it really boils down to understanding those Viewport Rect properties and the Depth setting. I’ve wasted enough time and money on this particular rabbit hole so you don’t have to.

Don’t let the fear of complexity keep you from implementing cool features. Most of these setups are far less intimidating than they first appear.

Next time you’re setting up a split-screen view, remember it’s not rocket science, just a few strategically placed numbers in the Inspector.

Just give it a shot on a test scene first, and you’ll see it’s a lot more straightforward than you might have assumed.