During porting to android I encountered that the game does not fit on the screen in portrait mode. It uses an orthographic camera. How could I scale to game to fit the screen in portrait mode?

landscape portrait

  • 2
    \$\begingroup\$ You'll have to define for use what "correct" scaling looks like for your game, compared to what you're getting now. There's a lot of ways we might try to scale/frame a game to work in a different orientation, depending on what your gameplay and visual style demands. \$\endgroup\$
    – DMGregory
    Commented Sep 15, 2017 at 16:16
  • \$\begingroup\$ The game is simply doesn't fit on the screen. With correct scaling I mean that the game is fully visible. \$\endgroup\$
    – user107380
    Commented Sep 15, 2017 at 19:50
  • 1
    \$\begingroup\$ What does "fully visible" look like for your game? Include examples in your question to make sure you get accurate, applicable answers. \$\endgroup\$
    – DMGregory
    Commented Sep 15, 2017 at 19:58
  • \$\begingroup\$ I think with the current description the problem should be already understandable, but I will include screen shots. \$\endgroup\$
    – user107380
    Commented Sep 16, 2017 at 7:55
  • 5
    \$\begingroup\$ It sounds like you want to add letterboxing bars above and below the game scene, shrinking the vertical height until the horizontal fits. You can find a script that will do that here: (Unity Android) How to force keep the aspect ratio and specific resolution without stretching the output screen view? \$\endgroup\$
    – DMGregory
    Commented Sep 16, 2017 at 11:29