Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug CommonUsages.deviceAcceleration bug on quest2?

Discussion in 'VR' started by Ikaro88, Aug 5, 2022.

  1. Ikaro88

    Ikaro88

    Joined:
    Jun 6, 2016
    Posts:
    296
    Hi
    On my quest 2 If I execute this code in the update:


    Code (CSharp):
    1.  
    2. InputDevice headDevice = InputDevices.GetDeviceAtXRNode(XRNode.Head);
    3.  
    4. Vector3 acceleration;
    5.             bool accelerationSupported = headDevice.TryGetFeatureValue(CommonUsages.deviceAcceleration, out acceleration);
    6.             string accelerationstring = acceleration.x.ToString() + "," + acceleration.y.ToString() + "," + acceleration.z.ToString() + ",";
    I get ALWAYS 0,0,0 and to me seems a bug...
    Also because accelerationSupported is ALWAYS true...

    there lines:


    Code (CSharp):
    1.   bool userPresent = false;
    2.             bool presenceFeatureSupported = headDevice.TryGetFeatureValue(CommonUsages.userPresence, out userPresent);
    Work as aspected
     
  2. CollosalChris

    CollosalChris

    Joined:
    Mar 17, 2014
    Posts:
    13
    FYI seeing the same running Unity 2021.3.15 builds on Meta Quest 2