Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Google VR SDK stuck in portrait mode

Discussion in 'AR/VR (XR) Discussion' started by adilicious5, Jun 1, 2019.

  1. adilicious5

    adilicious5

    Joined:
    May 20, 2019
    Posts:
    1
    Hey all, maybe somebody can help this beginner dev. I'm building my first test app for google cardboard on android. I've built the app and compiled it with VR enabled and cardboard selected as my VR device. I can install and run it on my phone (Samsung S8) BUT the in game camera is stuck in portrait mode and the yew is inverted (turning my head left turns the camera right). I have scoured the internet but still can't find a way to fix this.

    - I've enabled VR in playersettings and added google cardboard as my VR.
    - I've also disabled portrait views under orientation.
    - I've set the camera as both a child and parent object.
    - I've built the app with both cardboard and daydream selected as the VR (and each individually) but still the same issue.
    - I've tried forcing different higher levels of API requirement
    - I have added and removed GvrEditorEmulator from the project and the GvrControllerMain and no luck.
    - I've even flipped the camera manually by a 180 degrees and this made the view be in landscape but in this case the pitch was inverted (when I look up the camera looks down) and I haven't found a way to resolve this.

    In the editor view the screen looks fine, but every time I run it on my Android phone it force starts in portrait mode and the pitch or yew is inverted.

    Is there a hidden option I need to switch, does anybody have more suggestions that I could try?

    You can see what the app looks like when I hold the phone i portrait mode on the link bellow (the image breaks when I try to add it to the post for some reason).
    https://imgur.com/a/o80NRe4


    Its worth mentioning that I'm working with Unity version 2019 2.0b2 because any other version I tried would not detect my installed Android SDK and would not let me build the project. I've tried on multiple machines and always had that problem so I'm afraid of attempting an upgrade to a newer version would break my build ability.

    -----------------------------------------------------------------------------------------------------------------------------

    EDIT: This seems to be a known and reported issue for Google VR SDK for unity. Its been reported on their github page.

    The only possible fix is reverting back to Unity 2018.3.14f1. I did this by exporting my v2019 project, then creating a new 2018.3.14f1 version project and importing the original into it. This rebuilds the project and should avoid conflicts if you're lucky.

    -----------------------------------------------------------------------------------------------------------------------------
     
    Last edited: Jun 1, 2019
unityunity