Author Topic: Controller Input With Multiple Controllers  (Read 1760 times)

bridev

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 2
    • View Profile
Controller Input With Multiple Controllers
« on: September 24, 2014, 01:19:16 AM »
Hi there,

I am trying to create a UI that can be used by multiple players at the same time. Each player will have their own player setup to do (entering name, handicap, etc..). I would like to be able to have each player be able to modify its own set of NGUI controls. I have looked into the Controller Input example, and I have been able to use this for controlling one set of NGUI controls at a time. I am having trouble when there are multiple controllers interacting at the same time. Each controller can control all NGUI controls that have the UIKeyNavigation script attached.

I would like to be able to specify that each set of controls should only be able to be controlled by one controller (like controller 1 for player 1). Is this possible? I have not been able to figure out how through looking at documentation, examples, and the code.

Thanks for your time,

-Brian

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Controller Input With Multiple Controllers
« Reply #1 on: September 24, 2014, 01:51:07 PM »
It's not something that NGUI was designed for, unfortunately. Controller input in NGUI uses a single object for selection, and does not distinguish between different controller types. If you need that kind of code, you would need to create a custom input type (UICamera.onCustomInput), not rely on NGUI's controller handling.

bridev

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Controller Input With Multiple Controllers
« Reply #2 on: September 25, 2014, 12:10:50 AM »
That makes sense. I will look into using a custom input type. Thanks a lot for the help!