Godot-proposals: Allow to undo last point when creating polygon 2D

Created on 14 Mar 2020  Â·  5Comments  Â·  Source: godotengine/godot-proposals

Describe the project you are working on:
Game with lots of complex polygons.

Describe the problem or limitation you are having in your project:
So, polygons are main nodes building the environment collisions in my game. There's lots of them and they have lots of vertices (like, tens of them). I have my maps drawn based on grid, so when I create polygon I enable grid and join points on the texture. BUT, this requires lots of precision. And I sometimes make a mistake (i.e. place a point off by a grid cell). Theoretically not a big deal, because I can just correct it after finishing the polygon. But sometimes I make few mistakes and while correcting I might omit one and this results in a disaster (not really, but the collider doesn't match and I usually find it when testing game, but imagine I totally overlooked it. THAT would be disaster).

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Would be nice if I could undo last point when drawing polygon. Right now, right-click will cancel whole polygon. This is rarely really useful and also could be done with Escape. So right-click could remove last point instead, so when I make a mistake I can quickly correct it.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Just remove last polygon point when right-clicking during drawing.
Uno

If this enhancement will not be used often, can it be worked around with a few lines of script?:
It can't.

Is there a reason why this should be core and not an add-on in the asset library?:
It extends existing functionality.

editor

Most helpful comment

Um, you mean exactly what "backspace" currently does

I didn't know that ( ï½¥_ï½¥)
Is this documented anywhere?

Ok, so let's say this proposal is about swapping them (i.e. right mouse with backspace), because it sounds more convenient. But it suddenly became 90% less important .-.

All 5 comments

Um, you mean exactly what "backspace" currently does, just mapped to the right mouse button?
Currently right mouse button deletes all. Do you want them swapped, so the backspace key deletes all?

Um, you mean exactly what "backspace" currently does

I didn't know that ( ï½¥_ï½¥)
Is this documented anywhere?

Ok, so let's say this proposal is about swapping them (i.e. right mouse with backspace), because it sounds more convenient. But it suddenly became 90% less important .-.

Currently both "backspace" and "delete" can be used to undo the last point.
I think it will make more sense if right mouse button and "backspace" are used for undo and "delete" and "escape" are used to cancel the polygon.

I haven't figured out what exactly the conditions are, but sometimes "delete" will not undo the last point but rather a popup will appear and as me if I really want to delete the node. @cross034

sometimes "delete" will not undo the last point but rather a popup will appear and as me if I really want to delete the node

Ah, typical editor focus problems.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davthedev picture davthedev  Â·  3Comments

SleepProgger picture SleepProgger  Â·  3Comments

Torguen picture Torguen  Â·  3Comments

lupoDharkael picture lupoDharkael  Â·  3Comments

rainlizard picture rainlizard  Â·  3Comments