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

first pass at hit testing #154

Closed
wants to merge 4 commits into from
Closed

Conversation

cabanier
Copy link
Member

@cabanier cabanier commented Jun 5, 2020

This is a first proposal for hit testing.
The algorithm isn't complete yet but I want to get feedback to see if this is a good direction before filling in the details.

@cabanier cabanier requested review from toji and Manishearth June 5, 2020 23:46
webxrlayers-1.bs Outdated Show resolved Hide resolved
@cabanier cabanier requested a review from Manishearth June 6, 2020 03:05
webxrlayers-1.bs Outdated Show resolved Hide resolved
webxrlayers-1.bs Outdated Show resolved Hide resolved
@cabanier cabanier requested a review from Manishearth June 8, 2020 15:48
<dt> Otherwise
<dd> Let |result|'s {{XRLayerHitResult/hitSpace}} be a [=new=] {{XRSpace}} in the [=relevant realm=] of [=this=].
</dl>
1. Set |result|'s {{XRLayerHitResult/hitSpace}} to an {{XRSpace}} that has a [=XRSpace/native origin=] to the pose that should be used to render the 3D position that was hit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be defined above, and it should be mentioned that the space is only valid during frames where the hit has happened.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be defined above

What do you mean by "defined above"?

it should be mentioned that the space is only valid during frames where the hit has happened.

I looked how gripSpace is defined in the WebXR spec but I don't see where it mentions that it's only valid during the XRFrame.

@Manishearth
Copy link
Contributor

The more I think about this the more it seems like a subscription API (like hit-test), or an event API would be better. But I'd like to wait for @toji to chime in

@cabanier
Copy link
Member Author

cabanier commented Jun 8, 2020

The more I think about this the more it seems like a subscription API (like hit-test), or an event API would be better. But I'd like to wait for @toji to chime in

The event API will be added when we add support for HTML layers because in that scenario the controllers (and rays) are drawn by the UA.

@Manishearth
Copy link
Contributor

The event API will be added when we add support for HTML layers because in that scenario the controllers (and rays) are drawn by the UA.

I mean, the event API can also be added via a XRRay layerPointingRay defined on XRInputSource

@cabanier cabanier requested a review from Manishearth June 8, 2020 21:28
@cabanier
Copy link
Member Author

/agenda discuss the current hit test proposal

@probot-label probot-label bot added the agenda label Jun 15, 2020
@cabanier cabanier closed this Jun 16, 2020
@Yonet Yonet removed the agenda label Jun 23, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants