beek
beek

Reputation: 3746

Aframe double vision on Gear VR with stereo

I have a strange issue on aframe on Samsung Gear VR (in Chrome via a Cordova app).

Generally everything is fine until I load stereo video using the stereo component

Here the video is fine, however the cursor and any other 3D elements in the scene show double in the VR headset.

You can see in this screenshot that the cursor , text and pause button are not in alignment with the man behind, i.e. the the cursor on the right is on his shirt. That is partly because of the stereo effect, but if there is no stereo effect the cursor and other 3D elements line up and are clear in a headset. With the stereo effect they are all doubled in the headset.

enter image description here

The cursor is here

        {/* Camera */}
    <Entity rotation={defaultCameraRotation}>
      <Entity primitive='a-camera' id='camera'  mouse-zoom wasd-controls={wasdControls} stereocam="eye:left">
        {
          isVrEnabled &&
          <Entity position="0 0 -1"
            geometry="primitive: ring; radiusInner: 0.02; radiusOuter: 0.026;"
            material={cursorMaterial}
            scale={cursorFuseScale}
            cursor={cursorAttributes}>
            <a-animation {...cursorClickAnimation} />
            <a-animation {...cursorFuseAnimation} />
            <Entity position="0 0 0"
              geometry="primitive: ring; radiusInner: 0.01; radiusOuter: 0.015;"
              material="color:white; shader: flat; opacity:0.7;"/>
          </Entity> 
        } 
      </Entity>
    </Entity>

It doesn't have this problem if you look to the side or back, only when facing the 3D video.i.e. if you turn to the side and look at the edge, the cursor lines up.

Upvotes: 0

Views: 291

Answers (1)

Diego Marcos
Diego Marcos

Reputation: 4585

You need a browser with native WebVR support like Oculus Browser or Samsung Internet. Polyfilled WebVR won’t work well in Gear VR. Unfortunately, It doesn’t seem that Cordova is WebVR compatible.

Chrome ships WebVR but only on daydream-ready phones and does not support GearVR. If you have a Samsung S8 / S9 and a daydream view you can enable WebVR in chrome://flags and stereo alignment should be correct.

Upvotes: 1

Related Questions