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.

Attach and Remove WorldAnchor

Hi guys,
I want to realize an own collision detection for moving an object not trough the spatial map. The object will be moved with the hands. Therefore I used the Interaction Manager. When I pickup the object and move it and release it I got following notification: "Can't add component 'WorldAnchor' to Cube because it conflicts with the existing 'Rigidbody' derived component!"

When I use the tapped gesture I check with an WorldAnchor is attached:

                if(cube.gameObject.GetComponent<WorldAnchor>())
                {
                    Destroy(cube.gameObject.GetComponent<WorldAnchor>());
                   cube.gameObject.AddComponent<Rigidbody>();
                   Backup.interaction = true;
                }

When I release the GO I do the following check:

if(Backup.interaction)
{
Destroy(cube.gameObject.GetComponent());
WorldAnchorManager.Instance.AttachAnchor(cube.gameObject);
Backup.interaction = false;
}

I tried a few version but I couldn't fix this issue :(

Tagged:

Best Answers

Answers

  • @mark_grossnickle thank you for the info.
    I have another question, I want to stop my GO after a collision with a collider. I implemented that with World Anchors. Further I want to move the GO backwards but I couldn't achieve that.

  • You probably should start a new thread with more details since this question is marked as answered.

    But if your GO has a world anchor on it then you do not want to move it. Or if you must move it you will need to delete immediately the world anchor, move it, then re-attach. But ideally you should be placing the anchor on something that does not move.

    Taqtile

Sign In or Register to comment.