Hi! I am making a android game using the unity engine, and I was adding tilt control to the object that i want to control. I just wanted to make it move from left to right on landscape mode, I used this script:
function Update ()
{
var dir : Vector3 = Vector3.zero;
dir.z = Input.acceleration.y;
dir *= Time.deltaTime;
transform.Translate (-dir * 13);
}
And when I test it on android the object that I needed to control with tilt did not show up and everything else did. Can some one help me ?