0
votes

I'm trying to integrate Google Cardboard SDK to Vuforia Unity project. The way of achieving this is described here. My problem is that the camera size is too small. I'm uploading pictures to explain it better:

Here is what I achieved.

Here is what I achieved

Here is what I expected to be: Here is what I expected to be

I'm pretty new to Vuforia and Unity and things aren't very clear. Can you tell me why the camera size is so small? Is there a way to make it big enough? I'm using Nexus 5. Thank you in advance!

4

4 Answers

0
votes

This is caused by the following line which they instructed you to add to CardboardEye.cs:

Vuforia.VuforiaBehaviour.Instance.ApplyCorrectedProjectionMatrix(proj, eye == Cardboard.Eye.Left);

In my project, I commented that out and it works much better, but then, I wasn't using the video passthrough. Your mileage may vary.

0
votes

The cardboard prefab scripts and the cardboard.eye i thick are the reason for that. If you keep the left/right cams for cardboard enable but you disable the camera property which auto correct every number you change during run time, (check it in editor) so if you disable the cam the script wont apply those values allowing you to use the AR ones, working full screen but! super zoomed in and that is a problem. as the zoom out is much better for real size.

0
votes

I fix it on my android phone just adding on CardboardEye.cs

zoom = 2.8f / Mathf.Lerp(1 / proj[1, 1], 1 / monoProj11, lerp) / proj[1, 1];
proj[0, 0] *= zoom;
proj[1, 1] *= zoom;

before

Vuforia.VuforiaBehaviour.Instance.ApplyCorrectedProjectionMatrix(proj, eye == Cardboard.Eye.Left);

NOTE: 2.8f be a arbitrary value...

Thanks,

0
votes

I use Unity 2019.4.* and Vuforia 9.8.8 and I found a simple solution: in "size" fields (x,y,z) of "transform" section of ARCamera I put 1.8 1.8 1.8. It works for me.