Pretty straight forward to the point, I created a game on Google Play using this exact code. The Accelerometer is much more sensitive making the game difficult.
Just today I made the iOS version and it’s not very sensitive at all. So I’m trying to boost the sensitivity a little more then what it is now for the IPhone build. How would I go about doing this?? Here is my code.
using UnityEngine;
using System.Collections;
public class Basket : MonoBehaviour {
public Camera cam;
private bool canControl;
// Use this for initialization
void Start () {
if (cam == null) {
cam = Camera.main;
}
canControl = false;
}
// Update is called once per frame
void Update () {
Vector3 pos = transform.position;
pos.z = 0;
transform.position = pos;
if (canControl) {
transform.Translate (Input.acceleration.x, 0, -Input.acceleration.z);
rigidbody2D.position = new Vector2(
Mathf.Clamp (rigidbody2D.position.x, -2.7f, 2.7f), 0.0f);
}
}
public void ToggleControl (bool toggle) {
canControl = toggle;
}
}