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 helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Mesh Generation between two splines vatan 4 189 02-14-2025, 07:11 AM
Last Post: vatan
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 97 02-03-2025, 09:34 AM
Last Post: _Aka_
Information Questions regarding spline colliders and collisions with rigidbodies Spyboticer 7 354 01-20-2025, 12:25 PM
Last Post: _Aka_
  Extrude mesh along spline. New and confused user GhostStalker 3 121 01-02-2025, 09:58 AM
Last Post: _Aka_

Forum Jump: