WebCamTexture on iOS showing different area

I’m using Unity’s WebCamTexture to capture images of the back camera from my IPad. While on the PC, using the integrated monitor camera, this just works fine, I experience a strange kind of zoom on the IPad. You can see on image img_0340.jpg what the iOS camera app captures and on img_0341.jpg the textured plane. (Yes the aspect ratio is different and i cut out some gui parts) It just looks like if I zoomed in with the iOS camera app. How can I see the full scene? Whats going wrong here?

Thanks, Thomas

I just ran into this myself. The web cam texture aspect ratio does not match the screen aspect ratio.

This was my fix:

var webCamTexture = new WebCamTexture(deviceName, (int)(Camera.main.aspect * 720f), 720, 30);

I can’t seem to find any official documentation on the maximum WebCamTexture size. Most posts say 1280x720.

If you request a bigger texture Unity seems to round down to 1280x720 WITHOUT keeping the aspect ratio that you requested. So really you have to actually calculate the dimensions yourself.

It would be nice if you could just request a Screen.width x Screen.height texture and get the largest possible texture with the correct aspect ratio!