- Home /
Cardboard SDK secretly changing FOV?
Im trying to draw a full screen quad in my Cardboard SDK project.
MeshFilter filter = this.gameObject.AddComponent<MeshFilter>();
MeshRenderer renderer = this.gameObject.AddComponent<MeshRenderer>();
float distance = mainCamera.farClipPlane * distanceFactor;
Vector3 p0 = backgroundCamera.ViewportToWorldPoint(new Vector3(0, 0, distance));
Vector3 p1 = backgroundCamera.ViewportToWorldPoint(new Vector3(0, 1, distance));
Vector3 p2 = backgroundCamera.ViewportToWorldPoint(new Vector3(1, 0, distance));
float frustumHeight = Vector3.Distance(p0, p1);
float frustumWidth = Vector3.Distance(p0, p2);
filter.mesh = CreatePlaneMesh(frustumWidth, frustumHeight, distance);
Background camera is a normal camera to render distant elements (align with the head cameras) but this quad will be rendered by the GvrEyes. Now well if I render this with a background camera of 80 FOV it works in the editor and Galaxy S6 but it won't take the full screen in a Galaxy Note 4 unless I go to 120 FOV.
But, if I check the FOV of the gvreye cameras they say it is 80 at runtime in both phones and the editor! So it should work, certainly it is changing somewhere but I cannot find the real value.
This has allways been working for me in GearVR by the way.
Your answer
Follow this Question
Related Questions
VR Camera Fov 0 Answers
How to render part of FOV? 1 Answer
How to use two cameras in VR to display 3D object on top of UI panel? 0 Answers
Strange lighting on large-scale objects when using fog in VR 2 Answers