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

in Engine by (521 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

by (28,966 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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.