Invert Y axis in 2d

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

Can I invert the Y axis in the 2D mode of godot ? I want the y value going up when my objects go up.

You could probably make a new variable called something like “y_inverse” and set it to -y every step.

andersmmg | 2019-06-18 17:48

:bust_in_silhouette: Reply From: Dooowy.

Not enough info. However, you can shift the viewport to a higher Y axis.
Simply by dragging your camera and objects to a higher Y axis.

Explanation
In Computer Science, computers were built to render the screen from top → bottom and left → right, which naturally puts the view in any game engine to the 4th quadrant (-1,-1). Ideally most Developers want their 2D graphics to be in the 2nd axis (1,1).

Also I do not recommend making a new “y_inverse” variable because it’s unnecessary. If you are using C# I would recommend that you use a Pointer variable instead.