I just realised the new Input system breaks the gyro support on iOS.
SystemInfo.supportsGyroscope always returns false.
(This is in Unity 2019.4 LTS with Input system 1.0.0)
Does anyone know a way to hack this into working?
I’m too far in with the new system to revert back to the old input system.
Ah, my guess is the “Active Input Handling” player setting is disabling the path that initializes that property. Likely needs to get looked at. Would you mind filing a ticket with the Unity bug reporter? (“Help >> Report a Bug…” in the editor’s main menu)
For a workaround, my guess is that setting “Active Input Handling” in the player settings to “Both” should probably get the property initialized properly again.
In 2021 this is still a problem. I use 2020.3.12 (LTS for reason)
I created a simple scene where the smartphone controls the camera rotation. I wanted to use the new InputSystem. The result:
on android it works at first start, but if you pause the app and then resume, the gyro won’t work again
on ios the gyro does not work
I switched back and used the old input system and everything works.
So I’d like to ask the unity team, to create a simple gyro app for an iPhone and during this journey please fix the bugs.
One one the first anoying thing is
‘Gyroscope’ is an ambiguous reference between ‘UnityEngine.InputSystem.Gyroscope’ and ‘UnityEngine.Gyroscope’
But this is just the beginning and at the end it does not work reliable.
I used the verified 1.0.2 version. Good to know, that it is worked on. In the docs I read that gyro sensor in iOS with new input system is supported already.
I’ll clean the code to easily switch the input systems, update unity version and write a bug report, hopefully this week…
Hmm, digging through the changelog pretty sure I was wrong about gyro support and 1.1 previews. The stuff happening in the previews was about other sensors in iOS. Must be something else then. Might be worth firing a ticket off about this one, too. To my knowledge, this should be working just fine.
It was working in 1.1.0-preview.3 on my iPad and iPhone (haven’t tested on Android yet sorry).
I rolled back to 1.1.0-preview.3 so I have something to test with for the time being but I was wondering, is that likely to come back?
UnityEngine.InputSystem.Gyroscope.current does not send me the correct value at each frame. It gives me (0,0,0) for at least 10sec on my phone then gives me some value, then freeze randomly