Building a VR app in Unity for iOS. Added the GvrEditorEmulator into my project and the images that are sent to each eye are far more different than they should be. For example, the mountain in the left eye doesn’t appear anywhere in the right eye. As a result, the 3D effect is not working when I put the phone into Google Cardboard. Anyone know how to fix this or why this might be happening?
It’s known issue that has been fixed in some versions:
Unity 5.6.1p2 fixes the stretching. However, it still contains quite a lot of other bugs.
I’ve sent 3 bug reports of all cases we have to deal with. Hopefully they’ll be fixed at some point…
- The Z axis is totally off after exiting and re-entering VR a few times
- The Magic Window Mode (camera.localRotation = InputTracker.GetRotation(VRNode.CenterEye)) on iOS gives a different rotation than on Android. holding portrait moving left and right moves the camera up and down instead of along with the movement.
- The first time the app is built and run from xcode the VR camera is working fine, as soon as you close the app and re-open it and then enter VR the eyes are incorrectly set.
@MaskedMouse Do you have the case ids for the issues you reported?
Case 920429 Google VR Z axis rotated (half reproduced, even though I am able to reproduce this within seconds)
Case 920434 Google VR iOS Magic Window Mode incorrect rotation (Waiting for response)
Case 920497 Google VR 1.60 for iOS broken again (Has been reproduced)
I used a slimmed down version of our project for the bug cases.
If I need to slim it down even more or explain anything let me know in the case.
Used Unity 5.6.1p2, iPhone 6s iOS 10.3.2 & Samsung Galaxy S6 Android 7.0
Thanks.
@MaskedMouse One of the things you could try is to check the Input.deviceOrientation property and, if it has changed, stop and restart VR to reset to that orientation. That would get you around this issue right now while we look into what the best path forward for Unity is.
I take it that you’re referring to Case 920429?
Not really a solution, what if the user is looking sideways? the phone would be in “portrait” orientation in the cardboard. (if there is a possibility that it could happen then it will surely happen at some point)
Also lately we’ve found out that again when enabling VR, focus on a point, disable vr, focus on an other point and repeat these steps a few times; the android application would crash. I’ll send a bug report for that as well but I still got a lot of development to do on other features. It is quite sad to see that GVR is not tested properly on both iOS and Android by Unity. Due to all these bugs our application is still in an unreleasable state until the bugs are fixed.
I don’t understand what you mean by “focus on a point” in this context? Not sure what that has to do with the root issue of the crash? There is an issue with OpenGL that has taken us a while to fix with Google’s help that will hopefully be out soon that should stabilize crashes and other issues when going in/out of VR in OpenGL. That only affected Android though.
I’m not sure what you are expecting in regards to Cardboard on iOS? We can look into locking orientation of Landscape Left on iOS like happens on Android but I’m not sure if that is what you are asking for here?
Focus on a point, well just enable VR look somewhere, turn vr off, turn around 90 degrees and enable it again, turn around 90 degrees, turn it off again. (not really focussing on a specific point but rather moving around as if you’re looking & going in and out of VR mode)
I noticed that just enabling and disabling and enabling VR doesn’t make it crash as much, but only when the “user” has moved around in the meanwhile between enabling and disabling VR
And regards to Cardboard on iOS, I think you meant case 920434 which is the magic window mode. I expect it to work the same as android. Why would a developer have to write workarounds for specifically iOS? Unity is about unifying all platforms so that the code you write works the same on any of them. so when I hold my device vertical (Screen orientation set to automatic but use magic window mode) I expect it to work the same as on Android but instead on iOS it is rotating the wrong axis. I’d have to write a workaround for iOS specifically to switch the X and Y axis in specific screen orientations. Whereas with Android I can just use the automatic screen rotation and still be able to move around as it should. So for Android it is working perfect, for iOS it is not the same behaviour.
It seems like that the incorrect Z-Axis rotation was a bug on our side.
We didn’t even know that the initial rotation of the camera had influence on VR mode.
So the solution we got was resetting the rotation before entering VR mode.
That seemed to have fixed the bug.