Search Issue Tracker
Active
Under Consideration for 2.4.X
Votes
0
Found in [Package]
2.4.0-exp.1
Issue ID
XRCB-7
Regression
No
[Favro] XROrigin doesn't apply floor height properly when "Init XR on Startup" is unchecked.
This issue was reported by Microsoft via our shared [Favro|https://favro.com/organization/c564ede4ed3337f7b17986b6/92a21306751cb128050d951f?card=Uni-362313] board.
----
{color:#ff0000}*Note from QA:*{color}
I was able to easily reproduce the issue - WMR VR Win64 standalone app running with XR Runtime disabled at startup, which then that sub-system is manual started via script 1 second after app load. This causes the device / HMD camera starting height to be at something like double what it is if the XR Runtime is loaded at app start.
* I reproduced the issue with the latest OpenXR Plugin 1.9.1.
* I also still reproduced the issue with regression testing for 1.8.2 & 1.7.0 - this does not appear to be a regression.
You must have either the Headset Simulation enabled or use a WMR device like the Acer Mixed Reality Developer Edition HMD and controllers to see the repro. This repro project is using the default Windows, Mac, Linux build platform. The repro is performed by:
# Editor Play mode with WMR HMD device or sim enabled.
# Building a standalone Windows VR executable and running it from Explorer with WMR HMD device or sim enabled.
# Launching from the editor using Build and Play with WMR HMD device or sim enabled.
h5. PreReqs
# Mixed Reality Portal (MS Store)
# WMR compatible headset or [Using the Windows Mixed Reality simulator|https://learn.microsoft.com/en-us/windows/mixed-reality/develop/advanced-concepts/using-the-windows-mixed-reality-simulator]
h5. Customer submitted notes:
_*XROrigin doesn't apply floor height properly when "Init XR on Startup" is unchecked.*_
The "XROrigin.CurrentTrackingOrigin" is setup in "Start()" function. If the Unity app start with "initialize XR on Startup" unchecked, then "CurrentTrackingOrigin" will be initialized to "unknown" and therefore "Y Offset" is not applied to the "Camera Offset" object to 0 in "Floor" situation and leads to incorrect behavior (i.e. double floor height is applied).
!image (5).png!
!image (6).png!
!image (7).png!
Expectation, the "Y" should be reset to 0 when "CurrentTrackingOriginMode" is Floor when running the app. See logics inside XROrigin.bool SetupCamera(XRInputSubsystem inputSubsystem) function.
Observation of bug: When "init XR on startup" is unchecked, and app start XR in script later, the XROrigin.CurrentTrackingOrigin remained NotRequested instead of Floor.
Workaround, App can set "RequestedTrackingOriginMode" again after XR startup to trigger the compute of "CurrentTrackingOriginMode" again and correct the behavior.
Example:
{code:java}
var mode = GetComponent<XROrigin>().RequestedTrackingOriginMode;
yield return StartXR();
GetComponent<XROrigin>().RequestedTrackingOriginMode = mode;
{code}
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Skinned Mesh Renderer with multiple Animator Components does not render when "Optimize Game Objects" is enabled
- [iOS]Certain characters are not displayed when using iOS devices with 18 OS and newer
- Trees do not render in 'Unity Terrain - URP Demo Scene'
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are enabled
Add comment