protected void mapJoystick(Joystick joystick) {
        // Map it differently if there are Z axis
        if (joystick.getAxis(JoystickAxis.Z_ROTATION) != null
                && joystick.getAxis(JoystickAxis.Z_AXIS) != null) {

            // Make the left stick move
            joystick.getXAxis().assignAxis(CameraInput.FLYCAM_STRAFERIGHT, CameraInput.FLYCAM_STRAFELEFT);
            joystick.getYAxis().assignAxis(CameraInput.FLYCAM_BACKWARD, CameraInput.FLYCAM_FORWARD);

            // And the right stick control the camera
            joystick.getAxis(JoystickAxis.Z_ROTATION)
                    .assignAxis(CameraInput.FLYCAM_DOWN, CameraInput.FLYCAM_UP);
            joystick.getAxis(JoystickAxis.Z_AXIS)
                    .assignAxis(CameraInput.FLYCAM_RIGHT, CameraInput.FLYCAM_LEFT);

            // And let the dpad be up and down
            joystick.getPovYAxis().assignAxis(CameraInput.FLYCAM_RISE, CameraInput.FLYCAM_LOWER);

            if( joystick.getButton("Button 8") != null) {
                // Let the standard select button be the y invert toggle
                joystick.getButton("Button 8").assignButton(CameraInput.FLYCAM_INVERTY);
            }

        } else {
            joystick.getPovXAxis().assignAxis(CameraInput.FLYCAM_STRAFERIGHT, CameraInput.FLYCAM_STRAFELEFT);
            joystick.getPovYAxis().assignAxis(CameraInput.FLYCAM_FORWARD, CameraInput.FLYCAM_BACKWARD);
            joystick.getXAxis().assignAxis(CameraInput.FLYCAM_RIGHT, CameraInput.FLYCAM_LEFT);
            joystick.getYAxis().assignAxis(CameraInput.FLYCAM_DOWN, CameraInput.FLYCAM_UP);
        }
    }
Register this controller to receive input events from the specified input
manager.

@param inputManager (not null, alias created)
jme3-core/src/main/java/com/jme3/input/FlyByCamera.java