Samsung / GearVRf

The GearVR framework(GearVRf) is an Open Source VR rendering library for application development on VR-supported Android devices.
http://www.gearvrf.org
Apache License 2.0
407 stars 217 forks source link

Wrong orientation at starting time with Gear VR #1015

Closed niusounds closed 7 years ago

niusounds commented 7 years ago

Sometimes app starts in wrong orientation if I launch app with Gear VR (not in developer mode). No problems with in developer mode (without GearVR) or running in Cardboard/Daydream mode.

I'm using GearVRf prebuilt .aar libraries (v3.1), Galaxy S6 edge, and Android 6.0.

My ViewManager is like this (nothing special):

class SampleViewManager extends GVRMain {

    @Override
    public void onInit(GVRContext gvrContext) {

        GVRScene scene = gvrContext.getMainScene();
        scene.getMainCameraRig().getLeftCamera().setBackgroundColor(Color.WHITE);
        scene.getMainCameraRig().getRightCamera().setBackgroundColor(Color.WHITE);

        GVRTexture texture = gvrContext.loadTexture("mylogo.png");
        GVRSceneObject sceneObject = new GVRSceneObject(gvrContext, 4.0f, 2.0f, texture);
        sceneObject.getTransform().setPosition(0.0f, 0.0f, -7.0f);

        scene.addSceneObject(sceneObject);
    }

    @Override
    public void onStep() {
    }
}

I didn't check with latest master branch sources.

niusounds commented 7 years ago

I check with latest master branch sources. It looks to be fixed. Sorry.

liaxim commented 7 years ago

@niusounds Hi. Actually this is not a known problem with 3.1. It would be nice if you could share logcat output with us. If possible please specify the device model number (Settings->About device->Model number). Thanks.