hey, i have a little experiment with the android accelerometer. this code:
Vector3 dir;
public float grav = 10;
void Start () {
}
void FixedUpdate ()
{
dir.z = 0;
dir.x =-Input.acceleration.y;
Physics.gravity=new Vector3(dir.x*grav,-10,dir.z);
this code modifies the gravity: there is allways a vector with value -10 pointing down and according to the tilt angle on the phone it adds a 2n vector to the existing one on the direction i tilted
the question is :
in my phone the input.acceleration.y gives me the value of the unity’s matching x axis is this going to be the same in all devices or
can the acceleration.y match diferent axis according to the device ?
if YES how could i “calibrate” before starting the game to get the accelerometer’s axis i’m interested ?