-
Notifications
You must be signed in to change notification settings - Fork 415
Description
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:
viewerSpaceis not a reference space and cannot be fed togetViewerPose(). It also does not have an origin offsetidentityis (currently) restricted as to what spaces it can be related against ingetPose(), currently you can only relate it againstviewerSpaceandscreen-spacetargetRaySpace`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.