Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: malo88 on June 14, 2017, 03:55:36 AM

Title: UICamera onSchemaChange not called when pressing joypad trigger buttons
Post by: malo88 on June 14, 2017, 03:55:36 AM
Hello, I did a quick search on the forum but I didn't see an answer for my question so pardon me if it was already asked.
In our game we support the Xbox (One and 360) pad. It seems that the two triggers buttons (RT and LT) are not recognised by NGUI at all. What I mean is that, for example, when I press any other button and I am on a Mouse scheme, it changes to Controller scheme accordingly. Unfortunately it doesn't if I press the triggers. I checked in UICamera.cs in method ProcessOthers() where it does a for loop checking for all the pressed buttons and when I press the triggers it doesn't receive any input.
So, am I missing something? Is there a way to map those buttons to NGUI so that it changes the scheme as it does with the other buttons?
Thanks
Title: Re: UICamera onSchemaChange not called when pressing joypad trigger buttons
Post by: ArenMook on June 18, 2017, 07:23:00 PM
NGUI only listens to the axes and buttons you specify on UICamera. You need to specify their actions there. Also note that all controllers have completely different key and axis bindings, and there are no standards between them -- which is why add-ons like InControl or Rewired are a must-have for game development. You should set UICamera's control scheme yourself if your game detects joystick/controller input that is not already handled by NGUI.