Input.gyro

Hi there!

I wondering why input.gyro.attitude when start application in landscape and portrait are difference?

Such as, if you start application in landscape mode, the Y axis of gyro is in landscape X of device,

But if you start application in portrait mode the Y axis was changed to upside down instead.

I don’t know why…

Thanks!!!

Try setting this to true: Unity - Scripting API: Input.compensateSensors

1 Like

Thank you very much! I will try

Ok I tried to wrote
Input.compensateSensors = true

in first line before use input.Gyro (Start())
But it still the same or I need to write it in first frame when App start opening?
or need to write in Update() ?