Search Unity

Bug Angular Velocity different on Oculus Quest vs PC.

Discussion in 'VR' started by Chazney, Apr 2, 2022.

  1. Chazney

    Chazney

    Joined:
    Nov 27, 2014
    Posts:
    15
    I have done a lot of research on this to try and find a solution but a lot of the posts are almost a year old now and I am still seeing similar issues.

    I have created a demonstration project which is just the VR template with some game objects that show the angular velocity or velocity of the controllers. I have attached it to the post if you want to have a look. The LeftVelocity and RightVelocity game objects have a component that lets you toggle between positional and angular velocities.

    It was made on Unity 2021.2.17f1 using the OpenXR plugin provider. The input device used in the input actions is the Oculus Touch Controller (OpenXR) since the generic XR Controller wasn't reading out any angular velocity value.

    On PC (either built or playing in the editor), the angular velocities are presented in local space of the controllers. For example, if I am twisting my wrist using my arm as the axis, the angular velocity is reported as Vector3(0, 0, velocity), so the angular velocity is shown along the world Z axis. The vector can be rotated using the transform of the controllers in order to change it to world space.

    However, when I build on Android and run it on an Oculus device (the Quest 2 specifically, not sure if this matters), the angular velocities are presented directly in world space. That is, the transformation described in the previous paragraph is already performed which means I can use the angular velocity raw without needing to modify it.

    The positional velocities are the same on both platforms, the velocity is in world space and does not require any transformation.

    I have only tested on these 2 platforms since it's the only ones I own so I cannot say which behaviour is "wrong" (either behaviour is fine), only that they are different and they probably shouldn't be.

    I can use conditional compilation to check the build target and transform the angular velocity if I am building for Android, but I would prefer not to use conditional compilation between platforms as this can lead to all kinds of issues (such as two devices using the same platform but behave differently).
     

    Attached Files:

    BoPang likes this.
  2. Fairennuff

    Fairennuff

    Joined:
    Aug 19, 2016
    Posts:
    88
    Hello,

    I'm running up against this issue as well. Can't find any good info on it beyond your post. Did you ever find a work around or fix for this?

    This appears to be an issue on Quest 1 and 2. Using OpenXR, the legacy libOVR+OVRapi, or Oculus package manager plugin.

    Thanks!
     
    Last edited: Jul 22, 2022
  3. kittik

    kittik

    Joined:
    Mar 6, 2015
    Posts:
    565
    I am also experiencing this issue and am using this to report it. Using a Quest 1 with Unity 2021.3.15f1 and OpenXR.
     
    DevDunk likes this.