Currently all the Popochiu Objects that depend on a polygon (be it an InteractionPolygon2D or a NavigationRegion2D), allow the editing of the polygon shape through a button that selects the inner node "behind the scene".
This works, but it is susceptible to a lot of problems. For example:
It is difficult to manage the selection code and it requires a bit of trickery to jump back and forth between the parent node and the polygon inside it
If a node has more polygons (to represent "holes", or composite colliders - see #10 ), a single button to edit them all simply doesn't work
The user has to press a button to edit the polygon explicitly, or even just to see it on the scene, making the interaction annoying.
We need a better solution
Solution description
As silly as it can sound, we need to implement a new 2D gizmo, using the same implementation strategy we used in #232.
By painting on the viewport we may create a polygon gizmo tool that connects to one or multiple elements inside its node, and sports a tailored interaction.
Most of its behaviors will mimic normal polygon editing, but it may be switched from read-only (see-only) to editing mode, or change more polygons at once. Or even allow the creation of "holes" that are very useful in walkable areas.
Exclusions
None at the moment
Implications
This gizmo can be based on GD Extensions as suggested by @drbbgh, but this may be unfeasible if we want to represent more polygons with a single gizmo. We have to check.
Benefit description
Currently all the Popochiu Objects that depend on a polygon (be it an
InteractionPolygon2D
or aNavigationRegion2D
), allow the editing of the polygon shape through a button that selects the inner node "behind the scene".This works, but it is susceptible to a lot of problems. For example:
We need a better solution
Solution description
As silly as it can sound, we need to implement a new 2D gizmo, using the same implementation strategy we used in #232.
By painting on the viewport we may create a polygon gizmo tool that connects to one or multiple elements inside its node, and sports a tailored interaction.
Most of its behaviors will mimic normal polygon editing, but it may be switched from read-only (see-only) to editing mode, or change more polygons at once. Or even allow the creation of "holes" that are very useful in walkable areas.
Exclusions
None at the moment
Implications
This gizmo can be based on GD Extensions as suggested by @drbbgh, but this may be unfeasible if we want to represent more polygons with a single gizmo. We have to check.