Input.acceleration giving rotation values?

Why is it that my Input.acceleration value seems to give off a rotation value?

For example if I let my phone in between vertical and horizontal on my table, completely still.

I would get a value that is not just zeroes, shouldn’t the accelerometer only show a value that is not zero when you move your phone?

In this case it shows (0.0, -0.7, -0.7)

Also none of the values from Input.gyro work.

Don’t forget about gravity… it’s always here! The accelerometer is giving you the vector in the direction of gravity, the difference between how much the phone is accelerating and how much gravity wants to accelerate the sensor.

If you hold the phone over a soft surface and drop it then momentarily the acceleration readout will be very close to zero, because both the phone and its accelerometer are feeling (about) the same acceleration, gravity.

Thanks, makes sense, now what about the gyro not working? My phone is a moto g6 plus

I’d start with the usual googling for this. Might be your phone, might be an OS-level setting, might be a setting in PlayerPrefs (Unity), might just not be supported on your phone, etc.

Maybe you just need to reboot the phone because the Android daemon in charge of the gyro died. Android is flaky like that. :slight_smile: