Unity-Technologies / XR-Interaction-Toolkit-Examples

This repository contains various examples to use with the XR Interaction Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrading this project to 2020.3.6f causes issues in the XR Rig.

langokalla opened this issue · comments

Paraprhasing from my Forums post: https://forum.unity.com/threads/xr-rig-hand-rotation-after-upgrading-to-unity-2020-3-6f-and-openxr-plugin-1-1-1.1101961/

After upgrading my project from 2020.3.5f to 2020.3.6f, Unity also updated the OpenXR plugin to version 1.1.1.

My project uses the same setup of an action based XR Rig as the Unity XR Interaction Toolkit Example project, and has worked fine. However, after the upgrade I noticed both hands has rotated 90 degrees upwards (now pointing straight up, and not forward, when actually pointing the controllers forward). I tried rotating the ActionBasedController's ModelTransform 90 degrees back to compensate for this, and the hand model is fine again, but the XR Ray Interactors and their XRLineInteractorVisual and LineRenderer is still pointing straight up.

To make sure my XR Rig or project was not messed up in any way, I cloned the Unity XR Interaction Toolkit Example project again and upgraded that project to 2020.3.6f and OpenXR Plugin 1.1.1 to see if the same thing happens, and it does.

I also checked the XR Interaction Debugger to see if the actual rotation input from the controllers were different on the two Unity versions, but they are also the same. So there is something going on under the hood after the update.

Does anyone have an explanation for why this happens? Is it OpenXR just deciding on a different "default rotation" and Unity just has not updated their packages and/or examples? What do you think?

Now it is probably important to mention that upgrading the example project to OpenXR in Unity 2020.3.5f workes fine, even though the project does not use OpenXR by default.

How to reproduce:

  1. Clone a fresh version of the Example project and upgrade it to version 2020.3.6f.
  2. Hit play in the World Interaction Demo scene and notice that the hands / controllers are fine.
  3. Install the OpenXR Plugin and go to Project Settings -> XR Plugin Management and check only OpenXR.
  4. Go to Project Settings -> XR Plugin Management -> OpenXR -> Features and check feature set (mine is Oculus Touch Controller Profile).
  5. Hit play in the same scene, and notice the hands / controllers are now rotated 90 degrees and is now pointing up.

I just want to confirm that I also have the same issue after updating Unity from 2020.3.3 to 2020.3.6, which caused the OpenXR plugin to automatically update from version 1.0.3 to 1.1.1.

This issue is solved by changing the controllers' input bindings in the XRI Default Input Actions to pointerPosition and pointerRotation instead of devicePosition and deviceRotation.

https://forum.unity.com/threads/xr-rig-hand-rotation-after-upgrading-to-unity-2020-3-6f-and-openxr-plugin-1-1-1.1101961/