Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automated spline generation between objects
#1
Hello,

we are trying to implement a system which generates spline based roads between markers on a UI map.
The goal here is to connect these markers once and have the spline regenerate if any of those objects move avoiding manual recreation of said splines.

What would be the most efficient way to achieve that given all the tools that Curvy offers?

Regards
Alex
Reply
#2
Hi,
There are different ways to achieve that, depending on your setup. I think of two right now:

First method
  • Create a spline. See CurvySpline.Create()
  • for each marker, add a Control Point (CP for short) to the spline. See CurvySpline.Add(...)
  • Check if the markers moved. See Transform.hasChanged
  • Each time a marker changes, updated the position of the corresponding CP. See CurvySplineSegment.SetPosition(...)
Second metod:
  • Create a spline, and make it a parent of all the markers. See CurvySpline.Create()
  • Add a CurvySplineSegmentcomponent to each marker
  • Make the spline update itself from its hierarchy. See CurvySpline.SyncSplineFromHierarchy()
All these methods are documented in code and api.curvyeditor.com
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  UI button to start Curvy Spline in scene funkd 1 29 07-12-2019, 11:19 AM
Last Post: _Aka_
  Same Spline Extrusion with variable width MarioBag 3 115 06-27-2019, 12:41 PM
Last Post: _Aka_
  Point along Spline Ian@MrsWordsmith 3 141 06-21-2019, 03:50 PM
Last Post: _Aka_
  Starting from the End of a Spline Ian@MrsWordsmith 4 171 06-21-2019, 11:44 AM
Last Post: Ian@MrsWordsmith

Forum Jump: