Make camera always show the same area

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Vercte

Hello!

I’m looking for a way to always show the same amount of screen, even if you resize the window, or play the game on a larger monitor. I’m using a Camera2d for this.

For an example, I have a drawing:


The red part is the resized window/larger screen, and the blue is the desired area to show.
The black squares are objects for reference, to show how this an affect gameplay; think of them as items, enemies, other players, etc.

How can I program the Camera to only show the blue area, regardless of window size?

:bust_in_silhouette: Reply From: horsecar123

In your Project Settings go to Display/Window and in Stretch /Aspect try keep height and other mods.

1 Like

this is old but I came across it and using 4.3 when I try those modifications nothing changes, anyone know how to help?

@Mr_Hazmat ,
Goto Project Settings, Display > Window > Stretch > Mode
Change to canvas_item or viewport, depending on if you want the ui to resize.
Hope this helps :slight_smile:

1 Like