google / google/model-viewer

make sure the initial hit test angle is within the display field of view.

Open
#1,285 0 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
TypeScript
Stars
8.2k
Forks
947
PR merge metrics
No merged PRs in 30d

Description

https://github.com/google/model-viewer/blob/05e630c2994ad9698c75ef36d0d70fe12cdd1ed4/packages/model-viewer/src/three-components/ARRenderer.ts#L38

This line is fixed, and 20 degrees downward is probably ok on most phones in portrait mode (as the comments say). But some devices (e.g., iOS, using ARKit) can't hit test if the ray is offscreen. This will be an issue if Apple releases WebXR; current the WebXR Viewer implements WebXR and is limited in this way.

So perhaps compute an angle that is something like `fovY / 2 * -.9` (or something) to pick and angle just above the bottom of the screen.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.