05-18-2022, 11:21 AM
Hi there,
I want to create a procedural world where splines have to connect at runtime.
I think I am on the right track but I can't get the connection finalized meaning the same process when clicking in the Inspector: Connection - Control Point Options - Synchronization Presets - "Position and Rotation" after which the connection will be blended together.
What am I missing here?
Thanks a lot for helping out!
I want to create a procedural world where splines have to connect at runtime.
I think I am on the right track but I can't get the connection finalized meaning the same process when clicking in the Inspector: Connection - Control Point Options - Synchronization Presets - "Position and Rotation" after which the connection will be blended together.
Code:
var lastVisibleControlPoint = lastSplineController.Spline.LastVisibleControlPoint;
var firstVisibleControlPoint = firstSplineController.Spline.FirstVisibleControlPoint;
var connection = CurvyConnection.Create(lastVisibleControlPoint, firstVisibleControlPoint);
connection.SetSynchronisationPositionAndRotation(lastVisibleControlPoint.transform.position, lastVisibleControlPoint.transform.rotation);
What am I missing here?
Thanks a lot for helping out!