hi , I’m trying to build a project which uses accelerometer as its input . I created a guitext to debug and see how my Nexus S accelerometer works . I wrote this :
function Update()
{
var phoneX = Input.acceleration.x ;
var phoneY = Input.acceleration.y ;
var phoneZ = Input.acceleration.z ;
guiText.text = "phoneX : " + phoneX +
"
phoneY : " + phoneY +
"
phoneZ : " + phoneZ;
}
I’m trying to use the z value of accelerometer . I think the axis are y is in direction of phone’s height , x in direction of phone’s width and z is the vector coming out of screen . but holding the phone parallel to the floor and rotating it around it’s z doesn’t affect any of the accelerometer’s values.
I’ll be appreciated if someone can help me with this
thanks