0 votes

How do set that the player can't resize only the width or height, only both at the same time?
See this video to understand what I'm talking about: https://youtu.be/uaZ81rEm-iI

asked Jan 12, 2019 in Engine by fpicoral (502 points)

1 Answer

+1 vote

If you are talking about the window itself, I'm not aware of ways to do so in Godot (never saw Windows applications resizing like that). At worse you could place a check in _process which forcefully sets OS.window_size to the closest valid size?
However, you could use another stretch aspect option to keep the aspect ratio (and allow players to play fullscreen if they don't own a screen of the same ratio as your game), but due to the above it will always cause black bars to appear.
See here for more info: https://docs.godotengine.org/en/3.0/tutorials/viewports/multiple_resolutions.html

answered Jan 14, 2019 by Zylann (26,153 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.