Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug XR Device Simulator and OpenXR

Discussion in 'XR Interaction Toolkit and Input' started by jnlulejian, Apr 10, 2021.

  1. jnlulejian

    jnlulejian

    Joined:
    Sep 9, 2018
    Posts:
    2
    Has anyone been able to get the toolkit's XR Device Simulator to work with the OpenXR runtime? Is it not yet supported yet and will be soon?

    It sort-of works if I enable the OpenXR plug-in, then go to Project Settings -> XR Plug-in Management -> OpenXR -> Features and turn on "Mock Runtime". By sort-of I mean it registers some of the mouse actions, but it doesn't register/allow you to change the look rotation/direction. So it just moves the controllers/headset up/down/left/right which limit's if productivity benefit since much of what I'm testing is pointing controllers at something specific in the scene.
     
  2. chris-massie

    chris-massie

    Unity Technologies

    Joined:
    Jun 23, 2020
    Posts:
    226
    There is currently a bug where the XR Device Simulator is incompatible with other XR Plug-in providers, including the OpenXR provider. When the value of the rotation Input Action is read, it can return an incorrect rotation due to a conflict between the real HMD device created by the OpenXR runtime and the virtual HMD device created by the simulator.

    As a workaround until that bug is resolved, you will have to temporarily disable the Plug-in Providers in Edit > Project Settings > XR Plug-in Management. Another alternative is to instead update the Tracked Pose Driver (New Input System) on your main camera to use the centerEyePosition and centerEyeRotation of the XR Simulated HMD specifically instead of the generic XR HMD.
     
    Threeyes, BelyakovM and CamSlalom like this.
  3. CamSlalom

    CamSlalom

    Joined:
    Nov 30, 2021
    Posts:
    1
    Holy crap. Thank you so much for this fix. Updating the Tracked Pose Driver on the Main Camera fixed the issue where the XR Device Simulator wasn't rotating the camera.