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

Raycasting is incorrect in mobile AR #88

Open
RSpace opened this issue Feb 27, 2018 · 1 comment
Open

Raycasting is incorrect in mobile AR #88

RSpace opened this issue Feb 27, 2018 · 1 comment

Comments

@RSpace
Copy link
Contributor

RSpace commented Feb 27, 2018

I posted this issue as a question on Stack Overflow as I was unsure of whether it was a bug in this polyfill, three.xr.js or aframe-xr:

https://stackoverflow.com/questions/49009873/why-is-raycast-direction-calculated-incorrectly-in-webxr

However, the recent pointer with SITTING_EYE_HEIGHT and the fact that changing this constant to 0 goes some way to fix the raycasting issue has led me to believe that this is an issue that should be fixed in this polyfill.

What is the rationale for having a fixed eye height, as was introduced (or refactored) in this commit: 2a6b4e0

Why would the raycast direction still be off on the x-axis when setting SITTING_EYE_HEIGHT to 0?

@blairmacintyre
Copy link
Contributor

Hi, I know there's been discussion on the AFrame slack about this, but I thought I'd follow up here.

The idea behind the SITTING_EYE_HEIGHT was to provide some notion of a "floor" for systems that don't have it (since VR devices have a stage / floor). But, I think the idea is fundamentally flawed: such assumptions will always be "not quite right".

So, I think I'm going to change the polyfill to get rid of it, and keep the little utility function to create a "floorAnchor" (since our samples use it). So, I'll be changing the SITTING_EYE_HEIGHT to 0 (or removing it).

BUT, that doesn't explain your X offset. I don't see that, although I haven't tried the AFrame raycaster.

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

2 participants