Open TheDuckCow opened 1 year ago
Copying over @bdog2112's suggested reply from the other thread:
Food for thought:
Godot's "Curve3D" object has a "Tesselate" function that fits your description for good deformation:
PoolVector3Array tessellate(max_stages: int = 5, tolerance_degrees: float = 4) const
Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts...
Obviously, we're already setting the curve density and deciding where to sample it for drawing our loops. But, perhaps tesselate could provide some benefits in the overall shape of the curve.
Potentially timely and relevant is this video on youtube, highly recommend the full watch for anyone who reads this comment.
For extreme angles with the road points, we may need/benefit from having additional loop cut samples directly around the road point ends or middle (depending on how the curve handles are set and how much 'kinking' is happening). Additionally/alternatively, more checks will be necessary to check for overlapping/ kinking curves at the edges of road, perhaps dissolving vertices together if it would otherwise clip itself.
This is the supposed root cause of the below issue, although more investigation would be necessary.
https://user-images.githubusercontent.com/2958461/210024758-2c87ce31-7232-4327-95e8-fb4dd0839d34.mp4
Not currently prioritized.