How can I flip the whole screen horizontally in code?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MaaaxiKing

I want to flip the screen on x-axis in a script. Negating the x value of the scale does not work always because then it’s on the other side and one cannot see anything.

:bust_in_silhouette: Reply From: yrtv

Rotate RootViewport with https://docs.godotengine.org/en/stable/classes/class_viewport.html#class-viewport-property-canvas-transform

(not tested this)