Megalomaniak
I should have mentioned that I'm using Godot 3.5.2, but I think the commands are the same.
I tested out the commands with the following code:
extends Control
func _ready():
print(OS.get_screen_orientation())
func _on_Button_pressed():
OS.set_screen_orientation(0)
var viewport = get_viewport()
viewport.size = Vector2(1024, 600)
print(OS.get_screen_orientation())
It prints out "1" and then prints out "0" whenever the button is pressed, but the orientation and viewport doesn't change at all.
Does anyone know what I've done wrong?