Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connect two spline at runtime
#1
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.


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!
Reply


Messages In This Thread
Connect two spline at runtime - by Doomchecker - 05-18-2022, 11:21 AM
RE: Connect two spline at runtime - by _Aka_ - 05-18-2022, 12:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Set Volume to the Volume Controller at Runtime pako88 2 10 04-08-2024, 03:26 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: