Cross platform Xbox 360 controller (PC,Mac,Xbox 360/One)

Hi everyone,

Concerning the main differences in axis:

Should I do something like if (Application.platform == {some platform}) and act accordingly?

How do you handle this? Any best practice advice?

Thanks

I did this:

//controller axis on mac are different beasts with different axis
	if (Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.OSXPlayer){

		if (Input.GetAxis("Mouse X") < -callibration || Input.GetAxis("Mouse X") > callibration ||
			Input.GetAxis("XboxMac X") < -callibration || Input.GetAxis("XboxMac X") > callibration)

			cursorX += (Input.GetAxis("Mouse X") + Input.GetAxis("XboxMac X")) * sensitivityX;
		
		if (Input.GetAxis("Mouse Y") < -callibration || Input.GetAxis("Mouse Y") > callibration ||
			Input.GetAxis("XboxMac Y") < -callibration || Input.GetAxis("XboxMac Y") > callibration)

			cursorY -= (Input.GetAxis("Mouse Y") + Input.GetAxis("XboxMac Y")) * sensitivityY;
	}

	else {

		if (Input.GetAxis("Mouse X") < -callibration || Input.GetAxis("Mouse X") > callibration)
			cursorX += Input.GetAxis("Mouse X") * sensitivityX;
		
		if (Input.GetAxis("Mouse Y") < -callibration || Input.GetAxis("Mouse Y") > callibration)
			cursorY -= Input.GetAxis("Mouse Y") * sensitivityY;
	}

Not sure if there is a better way. Just act accordin to platform and define the necessary inputs in Input Manager and you are set :wink: