Game doesn't recognize X-axis input from XBox 360 controller

I have a problem with the usage of XBox controller in Unity game. I connected the controller to the PC and it works fine, I also managed to use it in the game itself - I’m using “A” button to fire and Start to start the game and they work properly. However the game doesn’t recognize the x-axis movement (y-axis would probably have the same problem but we don’t use it in our game). I’m not sure if the problem is in the input settings or my code. This is how the Horizontal movement is defined in the game:

55136-horizontalsettings.png

This is the code that handles the movement:

 float x = Input.GetAxis("Horizontal");
        Vector3 newPosition = new Vector3(transform.position.x + x*playerXMoveSpeed, 0, 0);            
        newPosition.y = transform.position.y;
        newPosition.z = 0;           

        transform.position = Vector3.Lerp(transform.position, newPosition, playerXMoveSpeed * Time.deltaTime);

        var limit = animator.SpriteRenderer.bounds.extents;
        if (transform.position.x - limit.x < leftBorder)
        {
            var capped = transform.position;
            capped.x = leftBorder + limit.x;
            transform.position = capped;
        }
        else if (transform.position.x + limit.x > rightBorder)
        {
            var capped = transform.position;
            capped.x = rightBorder - limit.x;
            transform.position = capped;
        }

        OnMove(gameObject);

All variables are more or less self explanatory, the OnMove is a delegate that just applies the transform to the gameObject in question. The entire code is inside a void method called Move(). That method is called inside an if statement:

if ((Input.GetAxis("Horizontal") != 0.0f || Input.GetButtonDown("Horizontal")))
        {
            Move();
        }

Like I said, the game recognizes the other buttons, but not the x-axis, it doesn’t move the character. The Input.GetButtonDown is there just so keyboard input would be supported also (and it works properly). Can you see the problem with this code or settings? Please advise.

Maybe it will be easy for you to use UnityStandardAssets.CrossPlatformInput ?