Hi,
I’ve set a fixed resolution of 640x480, and then the aspect ratio to “expand”.
Now if I use :
print(get_viewport().size.x)
print(get_viewport().content_scale_size.x)
I get 1920 (so my actual resolution width) and 640.
The thing is, 640 is not the real width of the viewport, it’s something like the 850, because I have a 16/9 ratio, so the game kept the height of 480 and stretched the game, which is exactly what I want.
But how can I access my actual viewport width ?
I could simply calculate it using the user resolution ratio, but there MUST be a simple variable giving me this information, no ?