x


Splitscreen w/ different GUIs on each camera

Hey, I'm trying to do a splitscreen deathmatch kind of game, and I'd like each player to have a health bar and some other HUD Gui textures on each camera, but obviously I'd like each one to be specific to that player's camera. Any way I can do that?

more ▼

asked Jul 14 '11 at 01:37 PM

nowhereman gravatar image

nowhereman
295 19 21 31

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

2 answers: sort newest

Figured it out. The answer was in putting the GUIs on different layers and changing each camera's Culling mask so it only saw its respective layer

more ▼

answered Jul 16 '11 at 08:47 PM

nowhereman gravatar image

nowhereman
295 19 21 31

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

You could make one script containing OnGUI which has an 'offset' variable, attach to each camera. Offset for one on the left maybe 0 and the the one on the right Screen.width/2 (or something like that)

more ▼

answered Jul 14 '11 at 04:19 PM

DaveA gravatar image

DaveA
26.8k 153 171 257

I haven't tried using an OnGUI script yet, but I'm not so sure if it would work, I would think it would end up putting both GUIs on both cameras, one at each camera's 0 offset and one at each camera's Screen.width/2. I'll have to try it out though....

Jul 14 '11 at 04:30 PM nowhereman
(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:

x3814
x714
x109
x99
x22

asked: Jul 14 '11 at 01:37 PM

Seen: 1630 times

Last Updated: Jul 16 '11 at 08:47 PM