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

User height offset is added multiple times when entering and exiting VR #3113

Closed
KrzysztofWrobel opened this issue Oct 3, 2017 · 4 comments

Comments

@KrzysztofWrobel
Copy link

KrzysztofWrobel commented Oct 3, 2017

Description:

  • A-Frame Version: 0.7.0
  • Platform / Device: MobileVR - Cardboard, Daydream, GearVR
  • Reproducible Code Snippet or URL:
    <a-entity camera="userHeight: 1.6" look-controls></a-entity>
    The same happens in an official exmaple:
    https://aframe.io/examples/showcase/helloworld/

Every time I enter and exit VR mode on mobile device userHeight offset is added multiple times to camera Y position. I used a quick fix, as follows:
<a-entity position="0 1.6 0" camera="userHeight: 0.01" look-controls></a-entity>
This helped, as a very small offset is added to camera height, but I assume it will break things on Vive, Oculus and Windows Mixed Reality headsets. :/
Edit: My quick fix also breaks controller position on Daydream and GearVR.

@weddingdj
Copy link
Contributor

In the "enter-vr" event listener I set the userHeight to 0 as a workaround. Works in Cardboard and Gear VR with controllers and I guess in the other HMDs as well.

I am not sure if this actually is a bug...

@machenmusik
Copy link
Contributor

Is this the same as #3051 / #3111 (now closed) ?

@dmarcos
Copy link
Member

dmarcos commented Oct 3, 2017

Yes, this seems a dup of #3051

@dmarcos dmarcos closed this as completed Oct 3, 2017
@KrzysztofWrobel
Copy link
Author

Thanks guys for your comments. Until PR referenced in #3111 is merged to master, I will check out the fix suggested by @weddingdj.

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

4 participants