TheDuckCow / godot-road-generator

A godot plugin for creating 3D highways and streets.
MIT License
311 stars 15 forks source link

Rename RoadNetwork to RoadContainer. #125

Closed TheDuckCow closed 9 months ago

TheDuckCow commented 9 months ago

Large change that makes the following updates, in preparation for intersections and new UI flow:

Implements most of the following, but does not address how two Roads are connected together just yet. https://github.com/TheDuckCow/godot-road-generator/issues/122

All tests pass: 12 passed 0 failed. Tests finished in 1.3s. 1 orphan.

New icons! Could be further tweaked, but aligned more to the "red-orange = implied 3D node", plus using a shape that stylistically fits with the logo made by Kenney.

Screen Shot 2023-09-24 at 10 22 16 AM

Though worth also throwing up here "option B" which is something I had messed around with for a few minutes

Screen Shot 2023-09-23 at 10 07 53 AM
TheDuckCow commented 9 months ago

Thanks for reviewing @bdog2112!

Noted that RoadSegment bounding box could grow really large when start and end point rotations/positions were varied. This was not a defect. Just an unanticipated development.

Yeah I also found this unexpected. I did quite a bit of searching and could not find a way to disable the editor bounding box. It's due to the fact that the mesh underneath in the node is actually counter-rotated differently to the one RoadPoint it's parented to, which indeed can lead to some large bounding boxes on selection. I find it somewhat distracting, but not terrible - and does at least make it crystal clear which meshes "belong" to a given RoadPoint.

Added "RoadContainer2" as child of RoadContainer1. Then, dragged RoadPoints from RoadContainer1 into RoadContainer2. Many different error messages were displayed in output panel. Also, RoadContainer1 displayed its previous/default warning. Lastly, RoadContainer2 displayed a different warning saying: "A RoadContainer should have a RoadManager somewhere in its parent hierarchy or be the scene root." (So far, it seemed like things were working as expected.)

Some very good QA testing there, I didn't even think to put a roadcontainer as a child of another one! I suppose we should think how we want that to function. Maybe users would actually want to create multiple levels of hierarchy actually. e.g. a road which has a bridge in the middle using a prefab scene, but the rest is using procedural geometry. It could be convenient that these "chunks" of the road could be grouped together, such that the child-most container rules apply the most (things like Road/Street name, properties like speed limit if we implement such things, etc). Might be hard to avoid the errors but something I'll take a look at, will merge this branch in the meantime.