Skip to content

Should identity and viewerSpace be merged? #623

@Manishearth

Description

@Manishearth

Brought up by @NellWaliczek in #621 (comment)

See also: #478

identity reference spaces and session.viewerSpace are both reference spaces with a native origin that matches the viewer/headset pose.

The differences are:

  • viewerSpace is not a reference space and cannot be fed to getViewerPose(). It also does not have an origin offset
  • identity is (currently) restricted as to what spaces it can be related against in getPose(), currently you can only relate it against viewerSpace and screen-space targetRaySpace`s. This is for privacy/permissions reasons.

It should be possible to merge them. I don't think it is necessary to restrict identity's ability to relate to other spaces for permissions reasons: the only way relating an identity space with other spaces can leak pose information is if you have another space that is not tied to the user's pose, and we can permissions-gate those anyway. Any information someone wants to leak from identity can be leaked through viewerSpace anyway, so whatever we design for permissions needs to be able to handle both.

One non-permissions concern of merging the two is that the concept of an identity space makes less sense in non-screen-space experiences, it's only an identity when related to the viewer pose (ignoring origin offsets).

A potential way of fixing that is to replace "identity" with a "viewer" reference space. This space can be related to everything, and it now has an origin offset. XRSession.viewerSpace returns a "viewer" reference space with no offset (for convenience). This seems conceptually clearer to me, and it keeps all the capabilities both spaces have right now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed by pending PRA PR that is in review will resolve this issue.potential breaking changeIssues that may affect the core design structure.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions