Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Shared experience - Moving objects

Hi all,
Based on the 240 tutorial, we are trying to build a Shared Experience app that allows two or more users to see the same objects in a room, but also to move and manipulate them.

We are using the same message based server from the tutorial, attempting to send an object's position (For now). Also, in addition to a remote user's head position, we are also attempting to send his Gaze information. We do so by drawing a line for each remote user, starting at his head and ending in his Gaze's hit position (Laser)

The main issue we are experiencing is that every time we run the app, we get strange behaviors such as:
1) Only one user is sending information (The other one can just watch but doesn't have any functionality)
2) One or none users can see the shared object
3) In general. "funny" and unexpected behaviors

We are also having doubts about the architecture of the sharing logic.
As of now, every user is sharing what he sees, and is receiving what the other users see.
Is this considered the optimal solution for sharing? We suspect this is causing all the strange behaviors we are experiencing.

Thanks in advance!

Answers

  • yoav,

    First off, Holograms 240 already has all the code you need for creating that gaze line. You shouldn't need to add any network message code to draw the line. You could add the logic to set the points of the line in RemotePlayerManager's UpdateHeadTransform function.
    for a 2 meter gaze line:
    Line starts at headInfo.HeadObject.transform.position
    Line ends at headInfo.HeadObject.transform.position + headInfo.HeadObject.transform.forward * 2.0;

    That being said, I'm guessing that you've added your own network message. My first instinct when I hear 'funny' behavior is that the code that sends the data isn't symmetrical with the code that receives the data. It's crucial to read every field you write in the same order you wrote them. And every message starts with the 64bit userId. If you don't read that userId, your buffer pointer won't advance to the field after the userID. Then when you try to read the next field, instead of getting the data for that field, you use the bytes that stored the userID. This can lead to unpredictable behavior.

    ===
    This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.

    (Daddy, what does 'now formatting drive C:' mean?)

Sign In or Register to comment.