Skip to content

Regression: camera Y position readback incorrect when in VR #3401

@machenmusik

Description

@machenmusik

As mentioned in Slack...

mchen [5:53 PM]
I can't recall where exactly, but I think that current master has an issue where the camera position in VR is not getting the correct height value (missing the standing matrix offset?) when you read back its position via getAttribute('position') or .object3D.position?

dmarcos [5:55 PM]
@mchen those issues should be gone

mchen [6:02 PM]
https://codepen.io/machenmusik/pen/oEQbab
1. run Firefox and go to that codepen
2. enter VR and put on your Rift
3. look for the Y label, look down, and notice it's negative

dmarcos [6:03 PM]
It is the rendered height wrong?

mchen [6:03 PM]
the text should be headlocked, as a child of entity with active camera.
both the head sphere and the headlocked text are displayed below where they should be, which is why I had to look down
(the headsphere should be rendered where the HMD is, but since you're inside it, you may only see the nose cone)
the value appears to be off by roughly 1.6 :confused:
https://github.com/aframevr/aframe/pull/3327#issuecomment-360019236
The HMD height assertion in (1) is not correct, as demonstrated by this example.

mchen [6:25 PM]
this version shows controllers, for reference... https://codepen.io/machenmusik/pen/QQJyXV

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions