How to make a split-screen? (2 cameras rendering at same time).
Answer by ericksson
Nov 23, 2009 at 10:06 PM
Use the Normalized Viewport Rectangle option in your camera. Normalized Viewport Rectangles are specifically for defining a certain portion of the screen that the current camera view will be drawn upon.
It's easy to create a two-player split screen effect using Normalized Viewport Rectangle. After you have created your two cameras, change player one's Ymin value to 0.5, and player two's Ymax: value to 0.5. This will make player one's camera display from halfway up the screen to the top, and player two's camera will start at the bottom and stop halfway up the screen.
Unity Reference link for Camera class here.
Answer by Tetrad
Nov 23, 2009 at 10:04 PM
Put two cameras in the scene.
In each camera there's a field for "Normalized View Port Rect". These numbers are from 0-1.
So for example if you want two cameras side-by-side you would have one camera at 0, 0, with Width = .5 and Height = 1. The other camera would be at .5, 0, with the same width and height.
Answer by Davies
Nov 28, 2009 at 12:20 AM
There's a bit in the 3D "Lerpz" tutorial about this on Unity's site.
Answer by feillyne
Nov 10, 2010 at 04:07 PM
Did a tutorial on how to make a splitscreen multiplayer game a couple of weeks ago, here's an example - CarEdu project: CarEdu IndieDB website
Here are tutorials: Tutorials page How to set up splitscreen cameras How to obtain splitscreen input
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
2 People are following this question.
Ignore rendering specific GameObject
Any clues on how to create a split-screen effect like the lego harry potter game?
Can the camera's viewport be non-rectangular?
What is happening to the Camera when I decrease the editor window height?
How to resize a camera's orthoSize for an object to fit inside its rect viewport?