2D Toolkit Forum

2D Toolkit => Support => Topic started by: Desttro on September 17, 2015, 02:36:20 pm

Title: Bad scaling of camera for 4x resolution iPad
Post by: Desttro on September 17, 2015, 02:36:20 pm
Hello,
I have sprite collection set by default to platform 2x, now I added 4x.

I have this script for change platform by resolution:
Code: [Select]
void Awake()
{
Application.targetFrameRate = 60;

if(Screen.width > 1136) {
tk2dSystem.CurrentPlatform = "4x";
}
else {
tk2dSystem.CurrentPlatform = "2x";
}

Debug.Log("CURRENT PLATFORM (main) : " + tk2dSystem.CurrentPlatform );
Debug.Log("Device data:");
Debug.Log("Screen resolution: " + Screen.width + " x " + Screen.height );

Application.LoadLevel("Menu");
}

Camera setup:

(http://petrsabrnak.eu/projekty/arma/camera.png)

When I have tried this to iPhone, all is fine, it look like this (same as editor):

(http://petrsabrnak.eu/projekty/arma/2x.png)

When I have tried this to iPad, it look bad - camera is still zoomed, not zoomed out (same as editor).

(http://petrsabrnak.eu/projekty/arma/4x.png)


How fix that please?
Title: Re: Bad scaling of camera for 4x resolution iPad
Post by: unikronsoftware on September 17, 2015, 11:13:22 pm
You need to add an override (fit vertical or horizontal, fit visible will work too)
Title: Re: Bad scaling of camera for 4x resolution iPad
Post by: Desttro on September 18, 2015, 07:51:44 am
I have this setup:

(http://petrsabrnak.eu/projekty/arma/override.png)

But it still shows in editor like this:

(http://petrsabrnak.eu/projekty/arma/4x.png)
Title: Re: Bad scaling of camera for 4x resolution iPad
Post by: Desttro on September 22, 2015, 06:56:52 am
Can someone help me please?
Title: Re: Bad scaling of camera for 4x resolution iPad
Post by: unikronsoftware on September 26, 2015, 02:07:24 pm
I've asked you some questions about your setup in the other post, please don't cross post.