- Edited
Hello everyone, I'm trying to implement different resolution settings to my game, I think I've nailed the script down but for some reason changing the resolution only zooms in or out and I tried many settings between stretch modes and stretch aspect but all of them seem to lead to the same result:
(standard res)
This is what I do to change the resolution from the menu (resolutions
being an array containing Vector2
s of the resolutions)
get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_VIEWPORT,SceneTree.STRETCH_ASPECT_KEEP,resolutions[index])
get_tree().get_root().set_size_override(true,resolutions[index])
get_tree().get_root().set_size_override_stretch(true)
It may be a very simple issue but I can't figure out for the life of me what is wrong,
Thanks to everyone in advance.