What is the best way to do this? I was thinking of connecting up to 4 USB controllers via a hub to a mac or pc, and was wondering the most effective way to:
-
Manage input from several controllers, and take full advantage of their functionality (nothing too crazy here)
-
Render to multiple viewports
-
Understand if Unity is even set up for this type of configuration.
Any ideas or help are hugely appreciated! Thanks in advance.
-P
Unity can get input from four joysticks, but you will need to configure each with its own axes in the Input Manager. Rendering to multiple viewports is also straightforward. A camera has a property called Normalized Viewport Rect that defines the onscreen rectangle in which that camera renders. Its coordinates are set using fractions of the screen width and height, so a width of 0.5 gives a viewport that is half as wide as the screen, etc. You can add as many cameras as you like to a scene and render each to its own viewport.
@Andeeee - I have a related question: Unity can support up to 4 separate joysticks and it is limited to 8 joystick axes and 20 joystick buttons. So is that 8 axes / 20 buttons -per- joystick or a total of 8 axis / buttons -total- for all joysticks?
I think it is rather 8 axis and 20 buttons per joystick (it would be madness if those were to be distributed…).
“Distributed” was my understanding of the limitation, but I haven’t tested it. You’ve piqued my interest on this, I’ll have to dig up a couple joysticks and give it a try.
I doubt it isn’t distributed. But I hope it isn’t.