-
Notifications
You must be signed in to change notification settings - Fork 19
Description
https://immersive-web.github.io/anchors/#create-an-anchor-from-hit-test-result
Let anchor native origin be a new native origin returned from the device’s call to create a new anchor using pose, interpreted as if expressed relative to hitTestResult’s native origin and attached to nativeEntity, at the frame’s time.
Create new anchor object anchor using anchor native origin and session.
Native origins are static transforms, this code is essentially freezing the anchor at the hit test result. I imagine the intent is to track a native entity.
What should be done here is that:
- An anchor should be able to hold either a native origin or a native entity
anchorSpaceis just defined as anXRSpacewith an "anchor" slot set toAnchor. If you want you can define this asXRAnchorSpaceinstead for ease of spec use.- Define the native origin of
XRSpaces that have "anchor" set to be:- the native origin, if set
- the native origin of the native entity otherwise
This is mostly spec pedantry and will not affect how the API is used.
Though if you're going the route of adding XRAnchorSpace, it's worth considering if XRAnchorSpace and XRAnchor can be merged (filed #47)