Rotate my game viewport (non-mobile) landscape to portrait

Godot Version



Hey Everyone

I’ve made a shooting arcade game, Japanese vertical scrolling style.

I made the game 480x960 in a HD 1920x1080 window.
I’m wanting to rotate the viewport 90 degress, so the game displayed in portrait mode.
ie 960x480…

I found this solution made in Godot 3

But I’m using Godot 4 and I’m not sure how to convert this to Godot 4.

Any help would be appriciated.


Have you tried just copy pasting the code from twitter and adjusting the parts where the engine gives you errors?