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.

How do you bet the boolean in isLocated in WorldAnchor components to be true?

I have a problem where I have successfully created a WorldAnchor position and I don;t seem to be able to set the isLocated boolen to true. I have tried storing it in WorldAnchorStore following the outline suggested in the manual and tried the following snippet:-

             try
            {

                anchor = m.AddComponent<WorldAnchor>();//Always returns a non-null value
                if (anchor != null)
                {
                    //save_anchor_point(anchor, gettagstring(pos));
                    anchor.transform.position = pos;
                    if (anchor.isLocated)
                    {
                        //anchor is located
                        comment = "world anchor is located";
                    }
                    else
                    {
                        comment = "world anchor is NOT located!";//Always returns this comment!
                    }
                }
                else
                {
                    comment = "not added worldanchor";
                }
            }
            catch
            {
                comment = "Exception caused for anchor = m.AddComponent<WorldAnchor>();";
                return null;
            }

The WorldAnchor status always returns "world anchor is NOT located". Please see the screen snippet below:-

So I would be most grateful if someone could guide me in the right direction.
Many thanks

Best Answers

Answers

  • Gosh I forgot about that. Thank you for that information I shall try that out.

  • Yes that is correct @Davon92 and I don't know why.

Sign In or Register to comment.