- Home /
How to make a split-screen? (2 cameras rendering at same time)
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
Your answer
