Search Unity

Question Overriding head tracking control of camera in Unity GVR (cardboard)

Discussion in 'VR' started by CEngstrom, Oct 19, 2020.

  1. CEngstrom

    CEngstrom

    Joined:
    Oct 26, 2019
    Posts:
    2
    Hi, everyone

    I am new to VR but not Unity. I am currently developing an application for android with the Google Cardboard SDK for Unity from July 2019 (version 1.200.1). I am wondering if there is a way to disassociate the rotation of camera from the head tracking of the headset (in my case this would just by the phone's gyroscope).

    Basically, I want to in certain circumstances totally limit rotation of the camera along the x axis so that the view is fixed regardless of Pitch movements of the head. In another circumstance, I want to mirror Yaw rotations along the y axis so when the subject moves their head to the right, the camera responds by rotating in the opposite fashion (to the left in the scene world).

    I searched high and low through the scripts provided by the GVR SDK package but I was unable to find anything I could tinker with. The only script attached to the camera is for the pointer. Even when I attach the camera to a custom built 'Camera Rig' game object, its rotation seems to be overridden by Google's built-in code.

    Apologies if my terminology is off. I am a newbie. Sending humility and gratitude to the community!
     
    blevok likes this.