Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug OpenXR Controller Positions Incorrect

Discussion in 'VR' started by ThatRaincoat, Oct 2, 2021.

  1. ThatRaincoat

    ThatRaincoat

    Joined:
    Jul 12, 2017
    Posts:
    27
    Migrating from using the Oculus XR Plugin to using the OpenXR plugin and am using the Tracked Pose Driver.

    Everything works great except for the Touch Controllers are positionally and rotationally offset from where they should be. I have tested the OpenXR plugin for both the Oculus and SteamVR Runtimes and the same offset occurs in both.

    When switching back to the Oculus Plugin the controllers are aligned perfectly once more.

    Unity 2020.3.15f2
    OpenXR Plugin 1.2.8
    XR Plugin Management 4.1.0
     
  2. Dark-Table

    Dark-Table

    Joined:
    Nov 25, 2008
    Posts:
    315
    OpenXR has two poses per controller: Grip Pose and Aim Pose.

    The idea is that if you are going to grab some in your hand it should get attached to the grip pose and if you're using the controller as a laser pointer (e.g. to interact with UI) you would use the aim pose.

    Unfortunately neither of these poses are in the same place as the controller position with the old OVRPlugin api. If you're moving to OpenXR and don't plan on looking back, just adjust everything's offset to match the new poses. If plan on switching back and forth you're going to need code to detect which runtime you're using and add an offset when you're using OpenXR.

    p.s. The Aim Pose is closer to where the old Oculus pose was.
     
  3. ThatRaincoat

    ThatRaincoat

    Joined:
    Jul 12, 2017
    Posts:
    27
    Thanks for the reply! I just adjusted the offsets manually and found that the Pointer Rotation is actually the same as the old OVRPlugin api. So I just had to adjust the positional offset. Glad to know it's actually different in OpenXR and I wasn't just getting the wrong positional data.

    Do you know if you need to make custom offsets for every controller with OpenXR? Or is the idea that once you have aligned one controller they will all be aligned?
     
  4. zacharygough07

    zacharygough07

    Joined:
    Sep 11, 2021
    Posts:
    4
    Sorry for necroposting, but how did you adjust the offset? Was it in the OpenXR settings, or did you just offset the hand model?