I'm making a game where you control a platform with balls falling on it, and you have to balance the balls and prevent them from falling off. I'm currently using a mouse to control it with this code:
transform.rotation.eulerAngles.z += Input.GetAxisRaw("Mouse X"); transform.rotation.eulerAngles.x += Input.GetAxisRaw("Mouse Y");
I'm trying to make this an Android app, and want to use motion controls so I can tilt the device, as if it were the platform. I figured I would use the accelerometer for this.
Any ideas on how to do this in Unity?