- Home /
Question by
dinizthiagobr · Jul 31, 2015 at 05:59 PM ·
camerascaling
Weird result with camera scaling?
I'm designing this game based on a 800x600 resolution screen and this is what it looks like:
When I select a different resolution, this is the result:
I don't want to have that empty space, so I changed the width of my Camera Viewport Rect with this code:
float idealAspect = 800f / 600f;
float aspect = (idealAspect / ((float)Screen.width / Screen.height));
Camera.main.rect = new Rect (0, 0, aspect, 1);
It works fine when running the game inside Unity, but when I run directly on my phone (Moto G 2nd gen.), this is the result:
Any idea what is causing this?
Thanks.
Comment
anyone?
I'm still stuck at this, can't find anything about it.