Nimbus controller X and Y key not working

Hello All,


I have a nimbus controller and I want to use its X and Y key.I have my input manager set up like above, but it is not working, could anyone help me with this?

Greg

Hi,

Maybe it comes in as a keypress?

To find out if it does:

Make a new script and add it to some object in your scene.

Paste this into script and run your scene:

        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //    LISTENS FOR ANY KEY EVENT AND LOGS ITS KEYCODE
        private void OnGUI()
        {
            Event oEvent = Event.current;
            if (oEvent != null)
            {
                if (oEvent.isKey)
                {
                    UnityEngine.Debug.Log("KEYCODE = " + oEvent.keyCode);
                }
            }
        }

Hi ,

I tried
public class TestScript : MonoBehaviour
{

void Start()
{

}

void Update()
{
Event oEvent = Event.current;
if (oEvent != null)
{
if (oEvent.isKey)
{
UnityEngine.Debug.Log("KEYCODE = " + oEvent.keyCode);
}
}
}
then I play our game and press couple button, the console did not output anything.

Your mapping for 15 is correct, but you have the mapping for type set to joystick axis instead of key or mouse button.

If you want to verify your assumptions on axis or buttons are right you can use my free tool and scene. https://www.assetstore.unity3d.com/en/#!/content/43621

Also I assume you’re testing on device because in the editor that isn’t going to work.

3162613--240652--upload_2017-7-27_22-38-21.pngSeems not working!

Also if you happend to know why the left joystick work on Mac, but when i try on my iPhone, it is not working.

Thanks,
Greg

It’s probably easiest to flip them to digital (changing type to key or mouse button from joystick axis) and then changing the gravity, dead, and sensitivity back to previous. That being said on Mac the mappings are going to be different (for example an xbox controller on mac is button 16,17,18, and 19 for the face buttons). 12 and 15 are for an IOS device.

For a nimbus I’m unsure off the top of my head what the different mappings would be. Probably best to check with my free tool on the mac https://www.assetstore.unity3d.com/en/#!/content/43621

Hi there,
I tried your scene, it only recognize left joystick and right joystick, not the rest of the buttons on the controller.

Greg

If the buttons don’t show up in that scene then Unity itself is not recognizing them. The simple scene is just displaying to the UI the raw underneath mappings. I’m assuming this is on the Mac (which would make sense because I don’t think Unity supported mFI controllers fully on Mac). When you run that scene on device it should give you the full mappings.

But I don’t think it will show anything on my iPhone because the direction works on Mac when I deploy our game to my iPhone none of those buttons work anymore.

That test scene works on all platforms.

Cool, when I press x, on the Axis says 16 positive and button 15 pressed. When I press y, on the Axis says 13 positive and button 12 pressed.

Hello there,
The controller seems working, but our game needs switch between, in the first scene, the X button works as expected, but when enter the next scene, the controller seems broken. Any idea why?

MFI controllers face buttons can be pressure sensitive which is why they are exposed both as axis and buttons. Unless you have a need for the pressure sensitivity I would just use the buttons.

Unity’s input manager doesn’t change by scene, so the only difference would have to be your input code between the two scenes.