It is a separate sensor, or it combines Gyro and/or Accelerometer data and/or something else?
If “and” case, then how AttitudeSensor.current.attitude.ReadValue(); will behave if the Gyro sensor is absent?
Will it the same as with the existing of Gyro?
How can I test this value “without Gyro” on Gyro Supported device? - for devices which have an accelerometer but don’t have a gyro… because I don’t have a device without a gyro
So there is new information in the latest docs.
Use the attitude sensor to determine the orientation of a device. This is useful to control content by rotating a device. Values are affected by the Compensate Orientation setting.
Note: On Android devices, there are two types of attitude sensors: RotationVector and GameRotationVector. Some Android devices have both types of sensor, while other devices may only have one or the other type available. These two types of attitude sensor behave slightly differently to each other. You can read about the differences between them here. Because of this variety in what type of rotation sensors are available across devices, when you require input from a rotation sensor on Android devices, you should include code that checks for your preferred type of rotation sensor with a fallback to the alternative type of rotation sensor if it is not present. For example:
AttitudeSensor attitudeSensor = InputSystem.GetDevice<AndroidRotationVector>();
if (attitudeSensor == null)
{
attitudeSensor = InputSystem.GetDevice<AndroidGameRotationVector>();
if (attitudeSensor == null)
Debug.LogError("AttitudeSensor is not available");
}
if (attitudeSensor != null)
InputSystem.EnableDevice(attitudeSensor);