10-21-2024, 03:46 AM
Hey there!
I'm using Curvy to generate some roads at runtime. I generate roads in segments by spawning a pre-set-up prefab with the generator, adding control points, then use a CurvyConnection to snap the end of one segment to the start of the next. The issue is that using bezier curves doesn't seem to connect the meshes nicely. If I use TCB curves and manually set the follow-ups (which aren't set automatically for some reason like other curves) it looks a lot better, but still not perfect.
Attached are some screenshots illustrating my settings and the issue I'm seeing.
Here is the code that is generating the connections:
Any help is appreciated. Thank you!
I'm using Curvy to generate some roads at runtime. I generate roads in segments by spawning a pre-set-up prefab with the generator, adding control points, then use a CurvyConnection to snap the end of one segment to the start of the next. The issue is that using bezier curves doesn't seem to connect the meshes nicely. If I use TCB curves and manually set the follow-ups (which aren't set automatically for some reason like other curves) it looks a lot better, but still not perfect.
Attached are some screenshots illustrating my settings and the issue I'm seeing.
Here is the code that is generating the connections:
Code:
var firstPoint = trackSpline.Add(currentPosition);
if (previousSegment != null)
{
var connection = CurvyConnection.Create(previousSegment.trackSpline.LastVisibleControlPoint, firstPoint[0]);
connection.SetSynchronizationOptions(true, true);
}
Any help is appreciated. Thank you!