I am observing some weird behaviour of the compass magnetic heading value. When I hold the phone on landscape mode everything’s fine, but In portrait mode I have noticed some strange things…
When the phone is in portrait mode and held vertically (something like : -0.1< phone pitch < 0.1), the compass goes totally crazy… (meaning that I get wrong and very jerky values).
Hi, thanks for your reply.
I’ve just tried your suggestion, and it leads to the same problem.
It’s not very surprising as the bug comes from the Input.compass.trueHeading value itself.
I tried using Input.accelerometer, but my sensor always jitter. That is why I’m not using device accelerometer, locking it in certain orientation anf lerping trueHeading with deltaTime.
I’m seeing the same issue - fine when flat, random when held up. The only other major reference I’m seeing is your own StackOverflow issue atreyu - did you find a solution?
Hi, no unfortunately I did not find any solution. I gess that reading raw sensor data and calculating by yourself the magnetic heading value could work, but personally I don’t know how to compute this value.
Please let me know if you find any information about this problem. Thanks !