This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

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.

in Engine by (44 points)

1 Answer

+2 votes
Best answer

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: https://github.com/godotengine/godot/issues/25616

In the end an option was added to turn off this behavior in editor settings, in Editors/2D/Constrain Editor View: https://github.com/godotengine/godot/pull/30041
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.

by (29,510 points)
selected by

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

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.