Godot Version: 3.1 BETA 1
I'm having trouble scaling the viewport for different devices. Initially I was using the "2D" stretch mode... but this gets a bit wonky with aspect ratios that are different from the artwork. I've gone for a pixel art style so clean scaling is important.
I have my stretch mode set to "viewport" and aspect set to "ignore". Here is what I have tried...
viewport.set_size_override(true, new_size_v2, Vector2.ZERO)
The above seems to be ignored. The image is fullscreen and stretched.
viewport.size = new_size_v2
This didn't help, the artwork was still small in the top left corner.
This does set the position and size correctly, but leaves the Godot splash screen in the background flickering.
Has anyone tackled this problem? If so, how did you get around it? Ultimately what I am looking to do is scale the viewport so that the game fits within the screen. Then, on devices with different aspect ratios, perhaps use a second viewport to render a background image to fill in the black bars.
Any input or pointers would be super helpful. Thanks :)