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
  Nested Spline Volume Spot Instantiation merobbins5 3 6 07-26-2024, 09:58 AM
Last Post: _Aka_
  Left-right movement, and spline follow shihaya 3 8 07-12-2024, 12:50 PM
Last Post: _Aka_
  How to start volume spots at the end of spline instead of front j95677 1 5 07-07-2024, 04:58 AM
Last Post: _Aka_
  How to get length starting from one spline to connected nth spline Dragon-3623 1 4 05-14-2024, 04:52 PM
Last Post: _Aka_

Forum Jump: