TheDuckCow / godot-road-generator

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

94 select roadsegment on click #95

Closed bdog2112 closed 1 year ago

bdog2112 commented 1 year ago

Address Issue #94

bdog2112 commented 1 year ago

This PR tackles several issues:

  1. 94

    Now, the nearest RoadPoint is selected when the user clicks the surface of the RoadSegment.

  2. 78

    When a user duplicates a RoadPoint, the invalid connections are automatically cleared. This prevents invalid geometry from being drawn. If auto_refresh is false, then invalid connections are not cleared as per the requirements. But, geometry is not drawn because redraw is effectively disabled. So, all is well.

  3. 77

    Previously, when a RoadPoint was deleted, a lengthy list of errors ensued. Most of these were attributed to attempts to draw RoadSegments that were queued for deletion and those errors have been resolved. Now, only one benign error is displayed per deleted RoadPoint: " core/node_path.cpp:223 - Condition "!p_np.is_absolute()" is true. Returned: NodePath() ". Translated, it seems to say that the deleted RoadPoint's previous/next RoadPoint has an invalid Prior/Next Pt Init (obviously because the referenced RoadPoint was deleted). This problem appears to be automatically resolved after the message is shown.

  4. 96

    It also addresses a regression that caused the Lane Widget handles to snap to the wrong spot under certain conditions.

bdog2112 commented 1 year ago

Per your request: Made RoadPoint junction validation to be more permissive. All GUT tests passed! Please evaluate this final change and let me know your findings. Upon final approval, I'll merge this PR.