Hello developers, i am working on sensor game but there’s a problem. I don’t know what can i do.
// Move object using accelerometer
var speed = 1.0;
var totalZ : float;
function Update () {
Debug.Log(Input.acceleration.z.ToString());
var dir : Vector3 = Vector3.zero;
// we assume that device is held parallel to the ground
// and Home button is in the right hand
// remap device acceleration axis to game coordinates:
// 1) XY plane of the device is mapped onto XZ plane
// 2) rotated 90 degrees around Y axis
//This equalizes to 0
var zAxis = Input.acceleration.z + 0.75;
var xAxis = Input.acceleration.x;
dir.z = xAxis ;
dir.y = zAxis;
if (dir.sqrMagnitude > 1)
dir.Normalize();
dir *= Time.deltaTime;
// Haraket Olasılıklarının Hepsi;
if (Input.acceleration.z < -0.75){
totalZ = Mathf.Abs(Input.acceleration.z)* 2;
Debug.Log("Move Up");
transform.Translate(-Vector3.up * totalZ * speed * Time.deltaTime);
}
if (Input.acceleration.z > -0.75){
totalZ = zAxis;
Debug.Log("Move Down");
transform.Translate(Vector3.up * totalZ * speed * Time.deltaTime);
}
}
this is my code. At there I’ve fixed acceretor to -0.75 as you see. Now i want to move up it’s ok but when i do “Down move starts at 0.25” but “Up move starts at 0.000001” i want to make “up” move start at 0.0001 but i can’t so help me please.

How about editing your [old question][1] instead of posting a new one? You should close or delete one of them. [1]: http://answers.unity3d.com/questions/581793/accelerometer-calibration.html
– Bunny83Deleted. So ? Will you help me ?
– Alp-Giray-Savrum