Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding multiple splines to one connection
#1
Hello again, as the title says I want to connect multiple splines to one connection - in code.
Now I can make a connection via code as you kindly guided me in this thread
https://forum.curvyeditor.com/thread-644.html

SO i have multiple objects each with their own spline & I am trying to make the last segment (last visible control point) of each object be part of the connection with seg.


when the first object  runs the code below it works fine, it's just when I try to run the script  again with other objects that it doesn't work as intended. What happens is a separate connection is made & there is no follow on spline. 
What I think I need to do is check if the control point has a connection (but don't know how)
then add a control point to that connection.

How could I do that please
 



So I make my connection like this :
Code:
CurvyConnection conn = CurvyConnection.Create ( spline_push.LastVisibleControlPoint,seg);
Reply
#2
Hi,
To get an existing connection of a control point, use CurvySplineSegment.Connection
https://api.curvyeditor.com/520/class_fluffy_underware_1_1_curvy_1_1_curvy_spline_segment.html#ad05977a2fd568b7495c7c4f219d77d78
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Great thanks
Reply
#4
You are welcome
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
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
Thumbs Up Can't delete connection lacota 3 6 03-16-2024, 11:34 AM
Last Post: _Aka_
  Using Unity's SplineContainer in Curvy Splines dlees9191 3 14 02-26-2024, 09:49 AM
Last Post: _Aka_
  Distance travelled across multiple splines jh092 1 7 02-23-2024, 09:44 AM
Last Post: _Aka_

Forum Jump: