Hey, everyone! I'm a CanvasItem noob, and I can't for the life of me get this to work. I need to be able to change the resolution in my game, but if I do, the camera isn't centered anymore. I think the problem has to do with the ViewportContainer node. Here's my node structure:
This is what it looks like in the default resolution:
And this is what it looks like in 2x resolution (without any camera movement):
I'm changing the resolution by changing the size in the viewport. I've tried changing it by code using setsizeoverride, but had the same results.
Reading the docs and some other questions in the forums, people suggested changing the stretch project settings, but it didn't help. Here are my current settings:
I also can't remove the ViewportContainer, there's a shader associated with it.
So, how can I change the resolution and keep the game scale and position? :(
Thank you so much to anyone who takes the time to answer <3