Why are negative axes in 2D limited in length?

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

In 2D, why are negative axes limited in length, whereas positive axes seem to extend endlessly?

I am trying to create a large gravity_point Area2D that needs to extend in the negative and positive sides of the axes equally in case the projectile is thrown with a high velocity so that it can come back rather than escaping the ‘collision area’ that enables the gravity.

:bust_in_silhouette: Reply From: Zylann

2D axes are not constrained, but the editor prevents you from dragging too far away if there is nothing past a fixed distance. This can be annoying if you resize your shape by dragging gizmos in the viewport. As a workaround, you could modify the size of the collision shape in the inspector instead.

Someone asked for this limitation to be removed, which was quite a long discussion: Remove 2D view limits · Issue #25616 · godotengine/godot · GitHub

In the end an option was added to turn off this behavior in editor settings, in Editors/2D/Constrain Editor View: Allow to remove 2D editor bounds by KoBeWi · Pull Request #30041 · godotengine/godot · GitHub
However you’ll have to wait for Godot 3.1.2 to use it. You can use the workaround I explained above in the meantime.

Thanks, that’s it! I will go ahead an try the nightly build.

RedPilled | 2019-09-26 13:21