I ran into a trouble while trying to add an accelerometer input in my game. This is the only trouble in my code, I think it’s correct, yet it always returns a 0
I already tried running the build on multiple android phones, checked that the phone’s accelerometer is working using Sensor Test app, made sure the accelerometer frequency in the project settings isn’t 0 (it’s 60)
I wonder if there could be any settings that I missed? Or perhaps is this not the correct way to get the accelerometer input at all? Please help.
I had the same problem.
Some threads suggest changing the accelerometerFrequency in the ProjectSettings.asset or setting Input.gyro.enable = true.
Nonetheless neither gyroscope nor accelerometer did return any values in my build. In the end this is what worked for me: Sensor Support | Package Manager UI website