Closed MattAU closed 3 years ago
Hi @MattAU,
Your expectations are correct. When you drag a pin to a new position (or orientation) and release it, then it should remain fixed in physical space, and the rest of the virtual objects should move to resume their relative positions around the pin.
I see that you are using the XRSDK setup. One thing to check is that you have updated the Anchor Management Subsystem type to XRSDK. It defaults to WSA. For XRSDK, it should look like this (I'm having trouble uploading screenshot, I'll try again in bit).
You can find that in the Inspector on the WorldLockingManager object's WorldLockingContext component. If you are running the WorldLockedPhysicsSample, the the HUD displays the Anchor Management Subsystem type, and it should read "XRSDK".
If that's not the problem, I suspect it is something similar. Would you be able to upload your UnityPlayer.log? I might be able to tell what's going wrong from that.
Also, I'll warn you now there is a known issue with the spatial mapping mesh displaying incorrectly with the XRSDK. See #103 for more details. The bottom line is that, because the FeatureTool installs as readonly, you can't apply the fix I suggest in that issue. The good news is that the fix is in MRTK v2.6.0, and that is supposed to be released this week. So the problem will just go away very soon.
Until then though, you might want to disable the spatial mesh, because it is kind of dizzying when it starts spinning around you.
Thanks for the very quick and detailed response. This is indeed the issue, which I should have remembered as I found and corrected this when I was trying one of the earlier samples last week. I was following this XRSDK path as it seemed like what will be required going forward but perhaps sticking to the legacy system in the short term is wiser until things mature a little more?
The space pins sample works great now in the 12x6m space I'm experimenting with thanks! Next step will probably be looking at the QR Space Pins example.
The one unexpected behaviour I still have is that the auto-save, auto-load options are turned on but each run of the app seems to reset the scene back to my head position and requires the alignment process again. Wasn't sure if this was related to using XRSDK (is this what issue 137 is about?) The docs don't seem to suggest how often the periodic save happens or maybe I'm doing something incorrectly when closing the app? Thought I'd attempt to add a button to explicitly call the save to see if that helps but maybe again there's something obvious I'm missing or misunderstanding.
Thanks
Thanks for the update! It's great to hear.
You are absolutely right about the persistence, it isn't supported on the XRSDK in WLTv1.2.4. I have a new package (with MRTK v2.6.0) coming out as soon as MRTK v2.6.0 releases, or Monday at the latest. The new package (WLT v1.2.7 I think) will include save/load for XRSDK anchors using the WMR XR Plugin (it's already supported for the OpenXR Plugin on HoloLens as of WLTv1.2.6).
As far as XRSDK versus Legacy MR, I'll share my thoughts, but don't take this as advice or wisdom, just another perspective to factor in. In my mind it's just about timeline. Looking to the future, XRSDK is clearly the way to go. But at the moment, I don't find it, how did you put it?, as "mature". So if I were going to ship a product in Unity2019, and the features I need are already there, I would target legacy. But if I was blocked by a current Unity bug, or was planning to ship with Unity2020+, or was hoping for a new feature, I would bet on XRSDK.
None of this is hard and fast. Important bug fixes are still going out to Unity2019 (and even Unity2018). But I believe new features and improvements are being focused on Unity2020 (and beyond).
Thanks again for the update!
I'm sure I'm missing something obvious as this is my first exploration into WLT but I haven't been able to get the Space Pins example to work as outlined in the walkthrough doc. I'm able to drag the sphere to a new location (or rotate them) but when I release they reset back to their original position. My exception from the walkthrough is they should stay in the new position and the virtual world should update its alignment.
Hololens 2 OS (up to date): 19041.1136 Unity 2019.4.19f1 MRTK 2.5.4 and WLT 1.2.4 imported with MRFeatureTool XRSDK Setup: XR Plugin Manager 3.2.17 Windows XR Plugin 2.5.2 XR Legacy Input Helpers 2.1.7 Space Pin example imported into a clean scene via the Package manager Positions of the markers (spheres) and markersreference (cubes) was adjusted to be a little closer than the default scene for the room I'm working in
Have I misunderstood something basic or do you have any suggestions that would explain this behaviour?
Thanks.