- Home /
Split-Screen with 2 Xbox 360 Controllers Input help
Does any one know how to make split screen? Now I have a splittet screen but I also want two diffrent Controller/Inputs wich, not only for the buttons, also for the left and right joystick. sorry for my english and I am a beginner in Unity3d.
Thanks
Is the problem that you don't know how to make the split screen using 2 cameras and viewports? Or is the problem that you don't know how to have 2 players moved around by 2 controllers?
Answer by Kreg Neg · Jun 21, 2013 at 07:20 PM
1st you asked how to make a split screen - if you go to your camera component you will see a "Normalized View Port Rect". There set one camera to something like "x-0.5,y-0,w-.5,h-1" and the other to "x-0,y-0,w-.5,h-1" if I remember correctly.
2nd i'm not sure if your doing this over the internet(netwrorked multiplayer) or with a person next to you but if it is over the interent you can use something like "networkview.ismine". Im not sure how you can go about this if you're going to play with a guy next to you
upvote for Normalized View Port.
2nd : you'll need to set up inputs for both players in the Input $$anonymous$$anager : http://docs.unity3d.com/Documentation/Components/class-Input$$anonymous$$anager.html
To see the Input $$anonymous$$anager choose: Edit -> Project Settings -> Input.
Joy Num : Which joystick should be used. By default this is set to retrieve the input from all joysticks. This is only used for input axes and not buttons.
set up controls for Joystick 1 and Joystick 2.
If you're clever about it, you only need to make 2 separate Player Input scripts, and then feed the inputs to the character script of each player.