microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Fix multi-user capabilities MRTK2 tutorials so content aligns correctly for all users #11533

Closed AMollis closed 9 months ago

AMollis commented 1 year ago

Describe the bug

This is tracking an issue from the ASA project

The bug describes on the MRTK tutorial is not correctly aligning content of all HoloLens 2 users joined to the same sharing session. We should investigate and fix any bugs in the sample code that is causing this misalignment.

Details

The original creator of the source bug writes:

Hi,

I'm using unity 2020.3.42f1, I'm running it with a PUN app and have 2 different hololens where I deploy the application (+my computer)

I'm doing my bachelor project on the multi-user capabilities of the Hololens. I have tried to follow this tutorial: https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unity/tutorials/mr-learning-sharing-01

Everything is working fine with the pun app, and I am able to view the players inside of the Room. The only thing missing for making it a shared experience is to have the coordinate system of all the different players to be the same. I have tried to introduce an azure spatial anchor to to share the location of the table (the object in the SharedPlayGround that defines the coordinate system of the position of the players) to the players so that their coordinate system lines up. The anchor is shared with the Sharing Module script and the Anchor Module. But whenever I deploy the application on two different hololens the position dosen't match up. (the player is also represented with a sphere and it dosen't coincide with the real position of the player.

How to run the app: wearer A:

start an azure session creates a local anchor shares this anchor (these steps seem to work as the have the correct logs) wearer B:

start an azure session get the anchor And here the issue occurs, the anchors seems to move a bit but it's position dosen't coincide with the position of anchor A -- here you can see the logs: image

image

I don't know if the null reference is the root of my issue. Another idea I have, is that maybe the environment isn't scanned enough before creating the achor (but I have a log telling me if that was the case - and it dosen't get printed so are we fine ?)

It would help me so much if you could help me, I have been struggling with this problems for weeks.

IssueSyncBot commented 9 months ago

Hi @AMollis,

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visithttps://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!