Splash image is not set when tracking is lost in hololens
Describe the bug
Splash image is not set when tracking is lost in Hololens
To reproduce
Steps to reproduce the behavior: Followed this link - https://learn.microsoft.com/en-us/windows/mixed-reality/mrtk-unity/mrtk2/features/extensions/lost-tracking-service?view=mrtkunity-2022-05
Your setup (please complete the following information)
- Unity Version [e.g. 2020.3.20f1]
- MRTK Version [e.g. v2.7.3]
Target platform (please complete the following information)
- HoloLens 2
- OpenXR
@CDiaz-MS @vtieto @qianw211
Ah hmm. Are you using the Mixed Reality OpenXR Plugin? Also, do you have an AR Session in the scene?
We are using OpenXR plugin. AR session is present as specified in above image.
Also tried the same in unity 2021.3.16f1 and MRTK 2.8.3.
Hope, we should disable On Tracking loss and pause and show image in setting ?
Ahh hmm. In your screenshot I see an AR Session Origin, but AR Session is a different component:
Can you try adding that to your scene and seeing what happens?
Issue exists with the above approach too
@hemasree99s @keveleigh I had the same problem. After some debugging, I found that the sessionSubsystem.trackingState in the Update() function of LostTrackingService.cs was only returning Tracking and Limited.
So I changed the following if statement from:
if (sessionSubsystem.trackingState == UnityEngine.XR.ARSubsystems.TrackingState.None && sessionSubsystem.notTrackingReason == NotTrackingReason.Relocalizing)
to the following:
if (sessionSubsystem.trackingState != UnityEngine.XR.ARSubsystems.TrackingState.Tracking && sessionSubsystem.notTrackingReason == NotTrackingReason.Relocalizing)
I'm not sure if this is may affect other parts of the code, but from my experience, while using HoloLens 2, I couldn't get the trackingState equal to TrackingState.None.
I could create a pull request for you guys to check if this helps.
Have a nice one, Stavros
@siamonas Thanks for looking into this! I double checked the implementation between the two and it looks like the OpenXR implementation is less likely to drop all the way to TrackingState.None compared to Windows XR Plugin. I think your proposed change would be good and reasonable!
@srinjoym, can you look into pulling #11407 into MRTK3.
We should also look into the possibility of completing PR #11407 for MRTK2