- Home /
Automatically adjusting the camera view
Description
've built a basic Pong game, however, I'm facing issues when it comes to different aspect ratios of the screen. The problem's main cause is the camera whose view is dependent on the screen size.
You can see my default camera settings in the picture below.
Resizing the scene view (or, generally speaking, the screen size, either in the development mode or in the release version) leads to this situation:
Question
What is the best way to overcome my issue?
I thought of having a script which automatically adjusts the camera, so the view will fully cover my playing field. Unfortunately, this introduces a new problem/context of the problem:
a) I want my game to be fullscreen, i.e. not containing any letterboxes, and
b) I am therefore fully responsible for automatic scaling of all objects (the paddles, the outer border, etc. – except the ball and few others).
Does anyone know a more elegant solution? Is any library/script for managing such cases already available?
Your answer
Follow this Question
Related Questions
Fixing the camera's left side in a 2D Game in all screen resolutions 0 Answers
Top-Down 2D game:How to make the camera move on hitting the sides of the screen? 2 Answers
Camera setup question 2 Answers
How to 2D Camera follow with lag. 1 Answer
Finding the right ortho size to fill the screen with an object 1 Answer