Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connection survives spline duplication
#1
Hi folks,

As a newbie I opened 03_Connections, duplicated the InnerShape (inner ring), translated it Northbound just past the OuterShape so that they touch, and made a connection between their overlapping control points.

First problem (solved, but took an hour): making a connection was not explained in the videos or docs; someone's forum thread set me straight (gotta select both points and then Connect, which doesn't always work for me)
Second problem: nothing happened; the spaceship never takes this route. As if there was no connection.
Third problem (not Curvy specific; I'm a Unity newbie too): while the preexisting splines are visible in full color in runtime, my spline isn't (I handmade another spline and that's not visible in runtime either) - no idea how to associate it with runtime color
Fourth problem: even when I associate the Plane Controller with my new spline, it goes a bit along that, then abruptly jumps back to another circle. What seems to happen is that the North CP of the duplicated InnerShape still "remembers" its participation in a connection that is legitimately present in the spline I cloned from. But of course it no longer makes sense in the duplicated and translated copy. So I went ahead and disassociated the North CP (CP0000) from the connection, with the little X button in Control Point Options / Control Point on the Inspector panel. Which worked, but it also impacted the spline I cloned from! Which therefore no longer functions. My theory is that duplicating the spline object just retained the reference to the original connections, ie. performed a shallow copy rather than a deep copy. But this theory doesn't help me much as I think there's a ton of value in being able to duplicate a spline which was in some connections and use it afresh.

While it may not be Curvy specific, I also ran into a series of problems with undo (works about as often as it doesn't), so I acquired the habit of saving the scene in known good states, and re-opening (without save) the scene if something goes awry.

While I'm going through learning Unity's idiosyncracies, does someone know:
- how to color my new spline for runtime visibility, like the existing ones in 13_connections
- how to make the spaceship sometimes take the junction
- how to Duplicate a spline so it doesn't carry the participations in connections
Reply
#2
Hi,
Your post deserves a longer answer, that I will post later today. Until then, here are some quick answers to some of your questions:

- how to make the spaceship sometimes take the junction
https://curvyeditor.com/documentation/controllers#connections_handling

- how to color my new spline for runtime visibility, like the existing ones in 13_connections
Scene 03_Connections uses this: https://curvyeditor.com/documentation/components/curvyglrenderer?s[]=curvy&s[]=gl
Otherwise, you can use this too: https://curvyeditor.com/documentation/components/curvylinerenderer
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
Thanks a lot for the quick reply!

- the spaceship is still the same (named Plane Controller in that scene) and its Connections handling is still the same: Follow Up Otherwise Random - I now tried Random Spline too, it still doesn't take the new path to which I made the smooth tangential connection - but by playing with the flags (eg. Reject divergent splines) the plane sometimes takes one of my new paths, yay!!!! thanks for the lead there

I still need to check the coloring a bit later.

I think what I miss with the coloring is the association of my new splines with the above referred CurvyGLRenderer (which seems like generic functionality). Where do I link it with my new splines? For some reason, even when I cloned one of the existing, properly rendered splines, the rendering association was apparently lost. I suppose that at the place of associating the spline with the rendering, the color is also specified, as some splines in the sample scene show up as orange or red. I'd expect that I could associate the spline with a color either in the spline, or some child object, but I can't find it
Reply
#4
Hi again. Here is the longer answer

- making a connection was not explained:
Noted. I will make this clear in the doc, and probably at some point make a connections related tutorial.

- As if there was no connection:
Yep, you found a bug. A connected spline when duplicate through Unity's editor will be in this weird state were its control point will be tied to a connection while not being part of it. I will try to fix this for the next update (the one after 6.4.0, which is already in the release process)

- select both points and then Connect, which doesn't always work for me:
That's tied to the bug above. For now avoid duplicating through the editor splines with connections

- I also ran into a series of problems with undo:
I am aware of some scenarios where undoing does not work, but I am probably not aware of all the scenarios you had. If you can, please write me back with the scenarios you encountred were undoing did not work.

- Where do I link it (CurvyGLRenderer ) with my new splines?
It's in the camera game object. A tip: in the hierarchy, you can type the following
t:whatever
and it will find all the objects with the whatever script. Examples:
t:camera
t:curvyglrenderer

Please remind me if I didn't answer one of your questions
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#5
Here is a quick fix to make a duplicated control point not part of a connection:
Go to CurvySplineSegment_private.cs, then the Awake method, then past this code at the beginning of the method:
Code:
           if (Connection && Connection.ControlPointsList.Contains(this) == false)
               SetConnection(null);
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#6
Thanks a lot for all the help! Got to render the spline as you suggested, making the association from within the camera. Thanks for the tip for finding things in the hierarchy too. You've addressed all my questions including some that are not very Curvy-specific. As for the duplication issue, I can simply refrain from cloning splines until a future release, I'm in no rush at all on that.
Reply
#7
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
#8
(05-10-2020, 10:37 PM)_Aka_ Wrote: - making a connection was not explained:
Noted. I will make this clear in the doc, and probably at some point make a connections related tutorial.
The connections tutorial is now on the youtube channel
https://www.youtube.com/watch?v=8Ok1WoaHQQY
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_
  GO can't fit end of the spline GameDeveloperek4123 3 13 03-04-2024, 11:06 AM
Last Post: _Aka_
  Keeping a fixed spline length jh092 3 16 02-21-2024, 06:25 AM
Last Post: Primrose44

Forum Jump: