TheDuckCow / godot-road-generator

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

Eliminating duplicate segments with changes in connection direction. #132

Closed TheDuckCow closed 8 months ago

TheDuckCow commented 8 months ago

Work in progress, to ensure users can connect roads RoadPoints, even if the face opposing directions. This is important as someone could be joining two different chains of roads that have many points and all face the wrong way compared to another stretch of road.

RoadPoints are ideally agnostic of direction, although a given RoadPoint will "own" one or more RoadSegment children. So in the event two roadpoints are facing each other (ie they both claim they are each others' "Next RoadPoint" for instance), one of them will inherently take ownership of the connection between them. We need to make sure to do this in a reliable, deterministic way.