- Home /
Google VR Cardboard mode shows video horizon distorted, like a fish eye lens
Hi
I'm creating an app for visualizing 360 videos in Unity 2019.2, using Google VR Android Version 1.18.4
The scene is basically built by a sphere with inverted normals and a camera inside of it. In Player Settings > XR settings, I turned on the Virtual Reality Supported check, and added 2 items: "None" and "Cardboard" VR SDKs.
When Cardboard mode is ON and I rotate the phone around me (only Y axis), the app shows the video distorted, like a sin wave which goes up and down, as if it had a fish eye lens. When Cardboard mode is OFF, the video shows as intended, with a flat horizon. This happens both in Android and iOS
This is a video capture of both scenarios: https://www.youtube.com/watch?v=0ymdUdBbWAo
This is the code I'm using to activate Cardboard
StartCoroutine(loadVR("Cardboard"));
....
IEnumerator loadVR(string device){
UnityEngine.XR.XRSettings.LoadDeviceByName(device);
yield return null;
UnityEngine.XR.XRSettings.enabled = true;
}
In order to give you an idea of the scene, it's the same as in this tutorial
https://www.youtube.com/watch?v=jqr0jaPKpmA
Any help will be highly appreciated
Answer by jaguartallerdigital · Oct 04, 2019 at 12:51 AM
In case anybody runs into the same error: The distorsion was caused by the initial rotation of the camera because it wasn't at euler(0,0,0). This also caused the camera to rotate strangely around the Z axis, whenever the Y axis reach certain point of rotation (I don't know exactly which one)
Your answer
Follow this Question
Related Questions
Play flat(not 360/180) stereo video in unity 0 Answers
Video freezing after a few seconds on Oculus Quest builds. 0 Answers
VR 360 Video Overlay,Virtual Reality Video Development 1 Answer
Overlaying 3D video on top of rendered world in VR 1 Answer
projet convert video 2D to virtual reality 3D in Unity with Oculus Rift 1 Answer