Closed TheDuckCow closed 1 year ago
Initial priority is to focus on the low hanging fruit: the delete and dissolve buttons. Add RP will require some more RD (but well worth it).
Remember that we are operating in "modes", not buttons that directly perform an action. See curve behavior for reference:
Moving this to unassigned and back into the backlog for now.
This video shows a unity asset with some useful controls it has for adding and extending road points. Noting down what I find interesting, but we'd synthesize what of this we would want to adopt and how to make it feel a bit more native to Godot.
l
toggles to show all the anchor points you can connect to. You can click on these anchor points, and they become selected (even though it's in a prefab). After you select an anchor point you go into a prefab and select the road to add, and it just adds a shortened road into the scene connected to that anchor.On this page there's a likely useful function _forward_3d_draw_over_viewport
which we could also use to draw or paint around the curser on or before clicks, perhaps to help indicate when and where connections are going to happen.
See also this demo which shows something very similar to likely what we might want, regarding the drawing of new roadpoints simultaneously with snapping and recognizing when to merge road points together to form a new intersection.
https://twitter.com/Nothke/status/1066506754794635264
In the context of adding road points and how this will fit together:
Forming an intersection will take some extra logic beyond this, but this is the initial idea of the interaction.
This task is now in progress, and I've basically completed the toolbar UI part. Works exactly and is styled exactly the same as the editor (in fact, no style overrides or custom icons used, I managed to get the source icons).
I've introduced a mode value, but no functionality based off of it yet.
Next steps will be the actual functionality of these defined tickboxes.
With the latest commits, we have a functional-enough dissolve/delete command. So will be marking this as done shortly!
We want to try and emulate much of the 3D path's functionality, including a quick way to click to add points, as well as easily delete a point without much consequence.
It would be good to implement both of these at once, so that that join the menu at the same time.
Pulled out of this task to be on its own: https://github.com/TheDuckCow/godot-road-generator/issues/5