Gvr-unity-sdk: Document how to recreate "Magic Window" (non-VR) camera tracking

Created on 10 Jan 2018  路  5Comments  路  Source: googlevr/gvr-unity-sdk

Need to document how to setup a (non-VR) "Magic Window" mode, such that the full screen monoscopic image on the device tracks the rotation of the device.

documentation bug

All 5 comments

Documentation of how to transition between VR (Daydream/Cardboard) and non-VR ("Magic Window") will be covered in #703.

Note, Unity docs currently describe Magic Window mode using:

UnityEngine.XR.XRSettings.enabled = false;
Camera.main.GetComponent<Transform>().localRotation = UnityEngine.XR.InputTracking.GetLocalRotation(XRNode.CenterEye);

However, in the Daydream case, the user will see a transition view after calling XRSettings.LoadDeviceByName("Daydream"), even though UnityEngine.XR.XRSettings.enabled remains false.

I've documented a basic script showing a working magic window which you can use to get started in your project: https://github.com/googlevr/gvr-unity-sdk/wiki/Magic-Window

It doesn't work. When I try to put it to MainCamera as script of GameObject, it says that I should fix compile errors before attaching it to GameObject. So when I compile it through Visual Studio it says:
"CS0229 C# Ambiguity between GyroController.CheckDrag() and GyroController.CheckDrag()" And so on. Also I noticed that you forgot one "}" at the end. Please help me to fix that error. Thank you!

I added this missing }, but the script appears to compile just fine. Can you git it another try?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FriskyBishop picture FriskyBishop  路  3Comments

qiaonifengxue picture qiaonifengxue  路  5Comments

linglonglinglong picture linglonglinglong  路  6Comments

rpassareti picture rpassareti  路  7Comments

guneyozsan picture guneyozsan  路  6Comments