webxr-polyfill icon indicating copy to clipboard operation
webxr-polyfill copied to clipboard

need a method to remove/destroy anchors

Open blairmacintyre opened this issue 6 years ago • 2 comments

Javascript programmers should be able to ask to destroy any anchor. For anchors they created, this should work. For system-created anchors, this may or may not work (system dependent.)

blairmacintyre avatar Feb 06 '18 14:02 blairmacintyre

Do we want “creating” an anchor to be distinct from “adding” one, and likewise do we want “destroying” an anchor to be distinct from “removing” one?

In other words, do we care about allowing a single anchor instance to be “added” and “removed” multiple times without “destroying” it?

speigg avatar Feb 06 '18 14:02 speigg

I don't think there is a difference: an anchor (as we have it here) is a tracked location (likely supported by the underlying platform). There is no concept right now of an anchor that exists independent of being coupled to a place in the world.

Now, it could be that an anchor is undefined initially, or that it's current position is of poor quality.

I assume you are asking from the viewpoint of "trackable" things being coupled to Anchors. I'm imagining that working the way ARKit 1.5's FaceAnchor's work: you enable Face tracking somehow, and when a face is found, an Anchor is created. When the face is lost, the anchor become "non-tracked", it's position not being "current" or valid. If the programmer destroy's it, it is gone, and a new Anchor would be created when that face is found again.

blairmacintyre avatar Feb 06 '18 16:02 blairmacintyre