Different angular velocity readouts on Quest vs Rift

It’s 5am and I’ve spent all day trying to get around this awful bug in UnityXR. Using TryGetFeatureValue to get the angular velocity of the controller is returning different results on the same Quest headset depending if I am using link (so rift emulation) or native to the Quest. I have checked the output from InputDevice to see if it’s a different orientation but it is not, it just for some reason gives a different readout for AngularVelocity and is proving a nightmare to program around.

Has anyone experienced this, and can point me in the right direction on how to get around this bug? I’ve also tried using a custom function for calculating the angular velocity manually but wasn’t getting great results. The way it works on PC is perfect but the exact same code is broken on the Quest.

Any help before I lose my mind would be greatly appreicated.

Managed to fix this. Incase anyone else runs across this problem.
For some reason you need to times the outputted angular velocity on the Quest by the inverse of the devices rotation. The thresholds still need to be flipped however. Code below with PC vs Quest methods if anyone needs it.

prive void GetDeviceRotation()
{
   if (controller.TryGetFeatureValue(CommonUsages.deviceRotation, out Quaternion rot))
            deviceRot = rot;
}

private void PCAngularCheck()
{
    if (controller.TryGetFeatureValue(CommonUsages.deviceAngularVelocity, out Vector3 angVel))
    {
            if (angVel.x < -10f)
                DoThing();
    }
}

private void QuestAngularCheck()
{
    if (controller.TryGetFeatureValue(CommonUsages.deviceAngularVelocity, out Vector3 angVel))
    {
        Vector3 correctedVel = Quaternion.Inverse(deviceRot) * angVel;

        if (correctedVel.x > 10f)
            DoThing();
    }
}
1 Like