Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Why is AttitudeSensor.current in NOT NULL on WebGL on MacBook Air M2?

Discussion in 'Input System' started by makaka-org, Jun 12, 2023.

  1. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    904
    It is not null and but AttitudeSensor.current.ReadValue() returns 0.0.0 in Update.

    Yes, the sensor is enabled by InputSystem.EnableDevice()

    MacBook Air M2 Has no Motion Sensors

    Unity 2022.3.1, Input System 1.6.1
     
    Last edited: Jun 13, 2023
  2. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    904
    So since there is no resolution of this bug or any explanation, I forced to set the NULL state manually for the mentioned platform in my asset called Sensor Camera, which operates with a gyroscope and accelerometer.

    At the same time, for the WebGL on iOS and Android, it is NOT NULL, and it's logically correct for devices that have physical sensor.