0 votes

I am creating a 2D menu with a 3D game area, in 2 different scenes.

To make the game scale on to different resolutions, I set stretch_mode to viewport and stretch_aspect to (e.g.) keep_width, which works fine in 2D.

For testing purposes, I set the test_width and test_height to half the actual sizes.

The problem when I run it is that, when I switch to the 3D scene, it displays a part of it in the top-left quadrant of the window, while the rest is just the edge of the scene stretched over the rest, as shown below.

How can I make everything (2D and 3D) scale to the target resolution correctly?

enter image description here

in Engine by (117 points)
edited by

2 Answers

+1 vote

I eventually came right by setting stretch_mode to "2d".

by (117 points)
0 votes

Try by changing ProjectSettings/Window/Mode to 2D or Viewport. If it still not in desired shape, you can move Shrink and Aspect to find the best for you.

by (20 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.