Unity bindings for Hardware api, device orientation is incorrect


The Unity bindings for the hardware API seem to have an issue in transforming the orientation from the inverse 3 device. Here is the code that transforms the quaternion from the inverse 3 coordinate system to unity’s coordinate system in HapticThread.cs.

    public Quaternion orientation
            if (CheckInitialized(false))
                var frameRHS = Quaternion.Euler(s_Frame);
                var frameLHS = Quaternion.Inverse(frameRHS);

                var calibration = m_Inverse3.GetOrientationCalibration(out _);

                var orientation = m_Inverse3.orientation;
                var q = new Quaternion(orientation.x, orientation.y, orientation.z, orientation.w);

                return frameLHS * q * frameRHS;
                return Quaternion.identity;

i am using this as

var orientation = m_HapticThread.orientation;
transform.localRotation = orientation;

to set the local rotation of a ‘HapticRig’ game object
the rotation appear to be inverted in some axes.

Could you please let me know the API version you are using?
Just to confirm before we proceed, have you attempted to calibrate it by pointing the screen, ensuring that the indicator LED is facing upwards as well, and holding down the calibration button located on the back?