Unity 5.6.2f1 + Cardboard SDK: Unable to look around + screen is tilted

I upgraded to Unity 5.6.2f1 and I can’t get any google cardboard vr to work properly. Every project I build, I cannot look around (frames are running but I have no control of the camera to look around) and my camera is tilted right from the start of game. I spent the past few hours trying to figure this out but no luck. Any ideas?


1 Like

Hello xslipstream,
Have your screenshots been made by the Unity editor or smartphone? What is the Google SDK version? If they were made by the editor try to compile and run the app on an Android device, if the view is not stereoscopic you have my own problem.

Yeah I had these problems as well in a previous version of unity (5.6.1p4).
[Edit]
get initial camera local rotation, cache it
before enabling VR, set camera local rotation to initial rotation

My images are screenshots of how my projects look on my Android. My editor view looks normal and my camera’s z axis rotation is already 0 so I don’t know why my scenes show up tilted this on my phone. And I can’t look around neither, the screen/camera gets fixed as soon as my projects launch.

They should give a proper manual on how to successfully get the VR experience going. What not to forget when activating VR mode. Like waiting a frame, set it to landscape before entering VR and such.

save the initial camera rotation (Camera.main.transform.localRotation)
just before enabling VR (VRSettings.enabled = true), set the camera localRotation to the initial rotation.

Seems like the Z-axis reset doesn’t work no, tried that just now as well… have to set the localRotation

I tried again to create a new scene → import googlevr v1.6 SDK → switch to Android platform and I’m getting the below error msg.

“Use of UNITY_MATRIX_MVP is detected. To transform a vertex into clip space, consider using UnityObjectToClipPos for better performance.”

I don’t think this is causing my head tracking issue though.

Hey @MaskedMouse , I didn’t know we had to script in order for VR to work? I never had to do it before, is this something new I must do?

For Unity 5.6.2p1, if you create a new project and just enable Support VR, without import GoogleVRForUnity package in your project, add cardboard device and select API 19, all work fine.
You don’t need Google plugin for Unity 5.6.2 If you only want to work with cardboard devices.

it still doesn’t work for me. I don’t understand why

Have you tried installing patch 5.6.2p1? Download Archive

just installed patch 5.6.2.p1 and tried again… didn’t work. =(

downgraded to 5.5.4, doesn’t work either same issue. No freaking clue wtf is going on

Right, just a re-cap do you use VR “None” or “cardboard” at the top of the VR SDK list?
we use “None” and use the “magic window mode”, the user is able to enable VR which is initialized wrong when the app is started in portrait mode. Bug report says won’t fix, fun times with unity… unreleasable product because they won’t fix the issue.

But if you start it instantly with cardboard, there shouldn’t be anything you should do.
A project with VR enabled and cardboard in the list should work from start. (have not tested this)
but if you think it is a bug, send a bug report.

I have got the same problem. I wanted to run the demo-scene from the Google Cardboard SDK on my phone but i couldn’t look around. Now my father helped me and we figured out that it could be because of a missing sensor in the phone(galaxyA5) that measures the movement. There is another sensor for movement, but it’s not used in there.
Now I am trying to set the Headmovement on my own, but I still don’t manage to simulate a real Headmovement, but at least something is moving.

void Update()
{
transform.Rotate(0, -Input.acceleration.z, 0);
}

I can move in one direction without any problems, but as soon as I try to move in all directions at the same time it starts to move around unncontrolled.

Your phone doesn’t have a gyroscope which is required for VR.
There is however an asset in the Asset Store that utilizes the accelerometer but I can’t imagine it being great as the accelerometer is not as precise as the gyroscope.

What I just noticed in our project is a dumb mistake such as updating the rotation when it shouldn’t be updated under specific conditions.