2D Toolkit Forum
2D Toolkit => Support => Topic started by: agp12 on March 16, 2013, 06:28:04 am
-
So I want to differentiate the target height in runtime, because if the game runs on Iphone 4 or 4GS, then the target height will be different than the target height I want on Iphone 5.
How can I change that in runtime?
-
You dont.
You simply change the orthographic size of your camera to compensate.
To make the camera pixel perfect again, use this:
float pixelHeight = camera.pixelHeight;
float newOrthoSize = pixelHeight / (float)initialCameraHeight * initialCameraOrthoSize;