x


How to make a split-screen? (2 cameras rendering at same time)

How to make a split-screen? (2 cameras rendering at same time).

more ▼

asked Nov 23, 2009 at 09:56 PM

user-297 (google) gravatar image

user-297 (google)
649 53 48 62

(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

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.

more ▼

answered Nov 23, 2009 at 10:06 PM

ericksson gravatar image

ericksson
2k 16 23 67

(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Nov 23, 2009 at 10:04 PM

Tetrad gravatar image

Tetrad
8.1k 62 65 130

(comments are locked)
10|3000 characters needed characters left

There's a bit in the 3D "Lerpz" tutorial about this on Unity's site.

more ▼

answered Nov 28, 2009 at 12:20 AM

Davies gravatar image

Davies
99 15 13 17

(comments are locked)
10|3000 characters needed characters left

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

more ▼

answered Nov 10, 2010 at 04:07 PM

feillyne gravatar image

feillyne
26 1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x4928
x1238
x137
x32

asked: Nov 23, 2009 at 09:56 PM

Seen: 28714 times

Last Updated: Jul 20, 2011 at 10:44 PM