- Home /
How to stretch camera to a rectangle?
Hello, given the World coordinates of the top left and bottom right of my game's rectangle, how can I make it so an ortographic camera stretches to that rectangle? Note that I don't want just height or just width to be on the edge. I want the camera to be stretched to the rectangle.
I started by trying to scale each object itself but i need to reposition according to viewport and scale each's width which seems way more complicated.
I have attached examples of how it would look like, adapting to different resolutions.
Answer by logicandchaos · Feb 02, 2020 at 06:57 PM
You have to change or add the resolution in the game window. Then you might have to adjust the camera settings.
Your answer
Follow this Question
Related Questions
Multiple orthographic cameras issue 2 Answers
ScreenToWorldPoint for different ortographic size 1 Answer
Camera placement / size behavior 3 Answers
put prefab in top left of the camera 0 Answers
Camera orthographic size not changing 0 Answers