See the video here which shows the difference between the current state (first part), and a quick and dirty re-definition of an old method (where we sample two points slightly apart and get the normal from that by crossing with the up-vector).
As can be seen, the current way causes bending of roads to fold in on itself, which creates a lot of artifacts, even though this indeed smooths the road and resolves the kinks issue (the original one described here: https://github.com/TheDuckCow/godot-road-generator/issues/14)
This quick-and-dirty new was does not handle the start/end points, so clearly these gaps are not ideal. We originally fixed this by setting the start/end values to be equal to the basis of the start or end roadpoint. This worked well, but is also what led to kinks when there was any tilting or twisting happening, kinks would arise right around roadpoints themselves.
The goal here is to find a solution closer to the original, which better ensures consistent road width (we don't want our roads varying in width between two points that specify the same road width), but also without kinking.
See the video here which shows the difference between the current state (first part), and a quick and dirty re-definition of an old method (where we sample two points slightly apart and get the normal from that by crossing with the up-vector).
As can be seen, the current way causes bending of roads to fold in on itself, which creates a lot of artifacts, even though this indeed smooths the road and resolves the kinks issue (the original one described here: https://github.com/TheDuckCow/godot-road-generator/issues/14)
https://github.com/TheDuckCow/godot-road-generator/assets/2958461/1f792247-31ef-4178-bb14-b66650c1f00e
This quick-and-dirty new was does not handle the start/end points, so clearly these gaps are not ideal. We originally fixed this by setting the start/end values to be equal to the basis of the start or end roadpoint. This worked well, but is also what led to kinks when there was any tilting or twisting happening, kinks would arise right around roadpoints themselves.
The goal here is to find a solution closer to the original, which better ensures consistent road width (we don't want our roads varying in width between two points that specify the same road width), but also without kinking.