You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
I was trying to change the extents of a shape with a script. By mistake I was setting them to negative values, and this was preventing collisions from being detected, which was confusing because the collision shape was still visible both in the editor and in-game, and with the correct size.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Throw an exception, or at the very least a warning, when any of the extents of a shape are set to negative values, to aid debugging.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The game would crash and an error would inform the developer of their mistake. Alternatively the game would keep on working and they would get a warning in the editor.
If this enhancement will not be used often, can it be worked around with a few lines of script?
It can be worked around by not making a mistake and setting the extents to negative values, but if it happens it can be very confusing.
Is there a reason why this should be core and not an add-on in the asset library?
There is no reason (that I can see) that a developer would ever want the extents to be negative, and allowing them leads to bugs.
The text was updated successfully, but these errors were encountered:
See godotengine/godot#37376, but it doesn't apply to collision shape extents. Nonetheless, I can't see any valid reason to use negative extents in a collision shape, so it should be possible to print an error message here without any risk of false positives.
Describe the project you are working on
2D platformer.
Describe the problem or limitation you are having in your project
I was trying to change the extents of a shape with a script. By mistake I was setting them to negative values, and this was preventing collisions from being detected, which was confusing because the collision shape was still visible both in the editor and in-game, and with the correct size.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Throw an exception, or at the very least a warning, when any of the extents of a shape are set to negative values, to aid debugging.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The game would crash and an error would inform the developer of their mistake. Alternatively the game would keep on working and they would get a warning in the editor.
If this enhancement will not be used often, can it be worked around with a few lines of script?
It can be worked around by not making a mistake and setting the extents to negative values, but if it happens it can be very confusing.
Is there a reason why this should be core and not an add-on in the asset library?
There is no reason (that I can see) that a developer would ever want the extents to be negative, and allowing them leads to bugs.
The text was updated successfully, but these errors were encountered: