TheDuckCow / godot-road-generator

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

Auto disconnect containers #141

Closed TheDuckCow closed 7 months ago

TheDuckCow commented 7 months ago

Adds auto checks to see if there are invalid connections or positions of RoadPoints advertised to be connected to roadpoints on other containers.

Additionally, creates an auto-snap function which will be called when pressing the physical button to Refresh Roads. As a consequence, other references which were more lazily calling rebuild segments with clear existing = true, were set to rebuild using clear existing = false or perform the necessary lower level function. This actually increases the performance of some actions, such as toggling RoadLane visibility.

This branch also moves RoadLanes to be direct children of RoadPoints (instead of children of RoadSegments), to allow for a future where we can directly expose them in the editor.

Also address in part, but not whole, the issue of a snapping tool. It is not really interactive yet though

All tests passing:

22 passed 0 failed.  Tests finished in 1.7s