Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec forces a choice of pointing ray #29

Open
Manishearth opened this issue May 1, 2020 · 0 comments
Open

Spec forces a choice of pointing ray #29

Manishearth opened this issue May 1, 2020 · 0 comments

Comments

@Manishearth
Copy link
Contributor

Manishearth commented May 1, 2020

https://immersive-web.github.io/dom-overlays/#onbeforexrselect

An XRSessionEvent of type beforexrselect is dispatched on the DOM overlay element before generating a WebXR selectstart input event if the input source’s targetRaySpace intersects the DOM overlay element at the time the input device’s primary action is triggered.

This will have the same problem as immersive-web/layers#21 , this is enforcing a particular choice of pointing ray (the -Z axis of the targetRaySpace). In general while targetRaySpace is the preferred pointing ray, applications are free to offset it and render whatever they like.

As in immersive-web/layers#21 it might be worth having an XRRay field on XRInputSource that defaults to a ray at the origin along -Z (i.e. the default XRRay) that defines what the pointing ray is.

I feel like overall this doesn't impact the transient screen input case because the orientation doesn't matter when your ray is directly on the UI element, but if anyone implements floating DOM overlays for HMDs applications may want control over this. This can be added backwards compatibly, so it might be worth waiting for layers to figure this out and piggyback on the solution. Filing an issue here as well to just keep track.

(There's also a slight issue here in that we should define this as intersecting with the -Z axis of the target ray space, there is no such thing as "space intersects element", but that's a minor change: #30)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant