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

Ray parameter as full matrix? #8

Closed
lincolnfrog opened this issue Mar 29, 2018 · 4 comments
Closed

Ray parameter as full matrix? #8

lincolnfrog opened this issue Mar 29, 2018 · 4 comments

Comments

@lincolnfrog
Copy link
Contributor

To be consistent with the rest of WebXR, the ray should be specified as a full 4x4 matrix rather than a position/direction vector pair. This is technically over-specified for a ray and shearing a ray is not something that would be useful, however the argument could be made that it is more compatible with the math types that are acquired from other systems so you can just feed parameters in directly without having to generate a origin/direction.

@blairmacintyre
Copy link

I think on the last call I was advocating for the point/vector, but I don't feel strongly either way. The argument that many libraries use matrices is compelling; three.js uses Ray's for it's intersection's, tho. So, it's unclear if that's a strong argument.

It's a ray. Represent it as a ray!

@ddorwin
Copy link
Contributor

ddorwin commented Mar 29, 2018

If we do end up finding that there are multiple patterns of usage, we could consider using an object or union as the input type. For now, we might start with consistency (and a single parameter), and see what feedback we get from authors.

@blairmacintyre
Copy link

Aside from the issue of needing multiple sorts of hitTests (screen-based and ray-based) (e.g., #7), I'd tend to agree.

leweaver pushed a commit to leweaver/webxr that referenced this issue Apr 16, 2018
…ction vectors.

pointerOrigin is now named 'targetRayMode' and can have values to { 'gazing', 'pointing', 'tapping' }.
pointerPose is now a ray consisting of two properties: 'targetRayOrigin' and 'targetRayDirection'.

This is to be in line with immersive-web/hit-test#8 until a final approach in immersive-web#339 is determined.
toji pushed a commit to immersive-web/webxr that referenced this issue May 29, 2018
…ction vectors.

pointerOrigin is now named 'targetRayMode' and can have values to { 'gazing', 'pointing', 'tapping' }.
pointerPose is now a ray consisting of two properties: 'targetRayOrigin' and 'targetRayDirection'.

This is to be in line with immersive-web/hit-test#8 until a final approach in #339 is determined.
@lincolnfrog
Copy link
Contributor Author

Closing as WebXR is now using XRRays directly so using a ray here is more consistent with the spec.

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

3 participants