Skip to content

Create an anchor from hit test result should not use native origins #46

@Manishearth

Description

@Manishearth

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
  • anchorSpace is just defined as an XRSpace with an "anchor" slot set to Anchor. If you want you can define this as XRAnchorSpace instead 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions