- Home /
2D Aspect Ratio Of Camera
How would I set out my game so that the position of the objects appear in the same place on different devices for example Ipad (portrait), Iphone5 (portrait) and Iphone3GS(portrait). I believe what I am talking about is the aspect ratio? :/
And that is worked out by Screen.height/Screen.width I believe but where and how do I use that figure with an orthographic camera?
Any help would be gratefully accepted! Thank You.
P.s. at the moment when I change the size in the unity editor from iphone (320*480) to Iphone5 (9:16) then the object is further from the right hand of the screen than in the previous resolution, that is what I would like to cure!
I see I thought it might turn out that way! Thank You for the reply anyways!
Answer by Fattie · Nov 18, 2012 at 05:03 PM
there is no simple solution. MAMC is actually a different game, on iPhone5 (the screen is longer) than iPhone4.
As you say,
"then the object is further from the right hand of the screen than in the previous resolution"
you have to literally decide on a new way to handle the iPhome5 game.
You may add curtains at each side, so the game play is the same, or make the spaceships move faster so it's "sort of" the same on the wider screen, or whatever works. It's a nuisance eh !
Answer by cenk5355 · Nov 20, 2012 at 04:02 PM
I think this is for your question:
http://answers.unity3d.com/questions/36678/world-space-to-pixel-space-accuracy.html