Search Unity

Controller readouts out wrong on Quest vs PC build (XR Toolkit)

Discussion in 'AR/VR (XR) Discussion' started by FishStickies94, Sep 27, 2020.

  1. FishStickies94

    FishStickies94

    Joined:
    Jul 27, 2019
    Posts:
    70
    Code (CSharp):
    1.  if (controller.TryGetFeatureValue(CommonUsages.deviceAngularVelocity, out Vector3 angVel))
    2.         {
    3.  
    4.             Vector3 localAngVel = currentHand.transform.parent.parent.transform.rotation * angVel;
    5.             localAngVel = currentHand.transform.InverseTransformDirection(localAngVel);
    For some reason this works fine in editor and in PC build, however on the Quest it produces a different result. It seems the orientations or something are changed depending on which device. Does anyone know the soultion to this problem? Use these readouts a far amount.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    The orientations are indeed different on different VR platforms. This is a major nuisance and there is no way around it that I'm aware of, other than to measure and compensate yourself.
     
  3. FishStickies94

    FishStickies94

    Joined:
    Jul 27, 2019
    Posts:
    70
    Yeah I’ve put a check in that modifies the calculation depending whether it’s on Android or not.

    However the bizarre thing is there is a difference between the Quest build and PCVR build, despite both using the Oculus XR plugin and using the same device.
     
    Last edited: Sep 28, 2020