Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Curvy 2 - the ultimate spline solution

Discussion in 'Assets and Asset Store' started by Jake-L, Sep 29, 2015.

  1. AnthonyPaulO

    AnthonyPaulO

    Joined:
    Nov 5, 2010
    Posts:
    110
    There's no problem ticking it, what I find is that ticked or not ticked the train keeps looping in the inner loop, never goes to the outer loop. I'll create a fresh project under the latest 2019.12 and see if it still happens.
     
  2. squallfgang

    squallfgang

    Joined:
    Sep 13, 2016
    Posts:
    21
    Hey great asset so far but I have one serious problem:

    I want to create Spline that includes many 90 degree angles. So i choose linear interpolation to get hardedges. Hovever the Mesh starts deforming very weird making it impossible to use (see Image).
    Do you know a good solution?
     

    Attached Files:

  3. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    If the train is too close to the junction when the tickbox's value is modified, then the modified value will only be used at the next loop. Other than this scenario, what you describe is not a normal behavior. Please keep me updated with your test on a fresh project.
    Thanks
     
  4. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Hi,
    You can find an answer in this forum post
    https://forum.curvyeditor.com/thread-690.html
    Have a nice day
     
  5. rise9912

    rise9912

    Joined:
    Feb 19, 2018
    Posts:
    10
    Hello! It's possible to use curvy for runtime spline generations on mobile platforms? I am trying to add nodes in my spline (Snake.Update() add new node every 0.15 seconds), and it has a really big fps drop on iphone XR (but I think it shouldn't). I thought it was a problem with the generator, but when I removed it, the problem still occurs. Thanks! upload_2019-12-27_2-44-43.png
     
  6. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Hi,

    Can you send me a reproduction project, or do a deep profiling (by setting the Deep Profile option at the top of the window) and send me the data? Those will help me pinpoint the issue.
    If I have to answer without that data, I would advise to:
    • Choose a lighter orientation mode if possible: None < Static < Dynamic
    • Reduce the Cache Density of the spline
    • If the spline is long, and only a small part of it gets updated, divide the spline in two, and update only the part that has to be modified
     
  7. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    The more you can share with me the more I can help. You can send me an email or PM me.
     
  8. francoiscoiscois

    francoiscoiscois

    Joined:
    Oct 23, 2019
    Posts:
    38
    Hi,

    I am interressed to purchase curvy with the playmaker integration you made and such good rating.
    However I would like to be sure I could use it for the purpose I need.

    Using it for educational kids app on mobile, I want to create mechanic where
    Kids drag an object along a sline, like a cisor along piece of close to cut it for example, the shape of the piece of close would be made with a spline (just an example). the cisor only move along the shape on drag, and it is possible to detect when the object have bin draged from the start to the end of the spline.
    Kids draw a letter or a number, that is made with a spline or multiples splines, with the ability to know if they correctly traced along the spline.
    I am not sure about this, but shape recognition, kids draw a 2 for example on screen, and it is compare to splines, and is detected as a 2 if the shape match.

    Is any of those example doable with Curvy, is it possible to achieve this with playmaker actions only or need some coding.

    Regards
     
  9. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    HI,
    First of all, sorry for the late reply.
    I feel that you are a french speaking person. If you want an answer in french please let me know.
    1. Dragging an object along a spline is doable through Spline Controller script
    2. Spline Controller trigger events when an object reaches specific points in the spline
    3. Shape recognition is a whole field which is complicated, but I guess that you can do some basic recognition (and I insist on the word "basic") by sampling evenly distributed points on both the kid's spline and the target spline (let's say each 1/10th of the distance), then computing the distance between each couple of points, and judging based on those distances
    4. You can do some of the above via Playmaker only (points 1 and 2), but you will need coding knowledge to be able to do point 3. And in general Curvy is a tool that can't be fully and truly used without coding.
    Did this help?
     
    francoiscoiscois likes this.
  10. francoiscoiscois

    francoiscoiscois

    Joined:
    Oct 23, 2019
    Posts:
    38
    Thank you for your in depth response,!
    I am french indeed, how could you read my accent?? But it's fine communicating in English and other people can benefice from your explanation.
    I can see what is doable with curvy, just have to define my project to see if I need those feature for now.
    Thank you for your support, have a great day !


     
  11. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    It was mainly the mix between "cloth" and "close", and your nickname.

    You are welcome. Let me know if you have any question
    Bonne journée
     
    francoiscoiscois likes this.
  12. dirty-rectangle

    dirty-rectangle

    Joined:
    Apr 23, 2015
    Posts:
    78
    Hi, I am using Curvy with addressable assets. I've noticed that any scene which has the _CurvyGlobal_ asset assigned to it will cause the asset bundle build to be non-deterministic.
    Addressables generates an asset bundle with its CRC appended to it. When i clean build the addressables in succession this CRC changes and the corresponding asset bundle name changes.
    This is a problem because it breaks the addressable content update workflow which depends on deterministic data builds.
    But I couldn't see anything specific in the _CurvyGlobal_ asset which would cause it to build non-deterministically?
     
  13. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Hi,
    I never used addressable assets. I will dig into this subject and try to find what causes the issue. This might take some time though. I will keep you updated
    Have a nice day
     
    atomicjoe likes this.
  14. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298
    I'm looking to purchase Curvy for roads. I want to ask, some questions.

    The extrude part of this asset has me a little confused. Are you only allowed to create shapes or can you provide a mesh to extrude along the spline?

    How would intersections work for roads? I assume you would have your splines and then a custom junction mesh. That's my current setup right now from picture below.

    junctions_DT.png

    I currently use a different spline asset and I have to manually line up splines to fit to the intersection meshes. Does Curvy have a way to line splines up to the intersection meshes? Manually doing it results in gaps and overlapping geometry no matter what. See picture below.

    Unity_2020-03-31_05-29-50.png

    If not, can the API be used to set position and rotation of a spline point so that it can be snapped to the middle vertex of the connection mesh? That would line up the custom mesh and the spline mesh with no gaps.

    Thank you for your time!
     
  15. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Hi,
    1. The extrusion uses only splines as inputs. So if you have a mesh, you will have to contour it's shape to get a spline that has the same shape. Contouring can be done manually, or you can use Curvy's API to add CPs at the position of the mesh's vertex you are interested in.
    2. You will have to use an intersection mesh too in Curvy. You can make Curvy place the mesh automatically on the spline at a desired relative/absolute position. That will avoid you to have to place the mesh manually each time the spline (used in the road extrusion) is modified.
    3. You can also use the API to set the position and rotation of spline points (called Control Points in the asset).
    Feel free to let me know if you have other questions
    Have a nice day
     
  16. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    rrahim and atomicjoe like this.
  17. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
  18. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    atomicjoe likes this.
  19. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Hi there,

    I just got Curvy and it's great. How can I apply a random range of Scale, Rotation and Position to generated GameObjects? It's possible to supply a range for "Space Before" or "Height" but it seems not for TRS.

    Am I missing something or is there another way for doing this?

    Thank you!
     
  20. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Hi,
    Thanks for the compliment :)
    My answer assumes that you use the Volume Spots module:
    1. Scale: It is not part of Curvy right now. It should not be too much work to add. I will try to make a quick (and dirty?) version for you, and add it as a proper feature in an upcoming update
    2. Position: You can do that by setting a Range for both "Height" and "Position Offset"
    3. Rotation: You can do that by setting the "Rotation Scatter" vector .... but I found out right now that it is bugged. I will fix it and send you the fix. The fix will be part of the next update
    Once I have something to send you, I will contact you by PM. Alright?
    Have a nice day, and sorry for the Rotation Scatter bug
     
  21. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Hi and thanks for the quick reply

    1. Adding Scale will be great!
    2. Height and Position Offset doesn't quite do the trick for me. Height works fine for the Y axis but Position Offset seems to rotate things. This is what the Position Offset does for me. upload_2020-4-27_15-37-10.png
    With 0 the planks are flat.

    3. Yes the Rotation Scatter seems to have a bug, only some Objects rotate with a fixed value, it should probably affect all Objects with a Random inside the range.

    Basically what I'm trying to achieve, is that the planks on the bridge have full TRS randomization. It seems like adding ranges to the "Input GameObject" and "TRS Mesh" would work, but I'm not sure if this will mess other things up since you need it in the Volume Spots Module? I'm sure you'll find a great solution.

    Thank you very much.
     
  22. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    2. Ok, I see

    Thanks for the suggestions. I will take the time to think about how to do this properly. Will keep you updated

    Have a nice day
     
  23. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    iddqd likes this.
  24. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    You can find a tutorial here:


    Hahaha, that's a good combo of double meaning words :D
     
    C_p_H likes this.
  25. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Skaltum and iddqd like this.
  26. ysshetty96

    ysshetty96

    Joined:
    Feb 27, 2019
    Posts:
    101
  27. ysshetty96

    ysshetty96

    Joined:
    Feb 27, 2019
    Posts:
    101
  28. rrahim

    rrahim

    Joined:
    Nov 30, 2015
    Posts:
    206
    Same here. Seems that the website is down.
     
    ysshetty96 likes this.
  29. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Hi,
    Sorry @rrahim @ysshetty96 and all, but since about 36 hours the server for my websites and emails is mostly down. I have spend the past two days trying to make my web hosting provider, GoDaddy, fix that, but with no success. They are basically telling me to wait an unspecified amount of time for things to work again, which is out of question. So I am in the process of moving to another web hosting provider. This will take some time, sorry for that.
    I will upload the documentation somewhere and will post a link underneath
     
    Last edited: Jun 21, 2020
    atomicjoe likes this.
  30. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    In this zip you will find the APIreference for the lastest 2 Curvy versions. Inside each folder, there is an index.html file. This is what you should open.
    https://www.dropbox.com/s/d0wun19pt2yx4l4/api.zip?dl=0
    Unfortunatly I can't share in the same way the other websites, since they need a running server and databases to work.
     
  31. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Problem seems to be solved. I will keep an eye on this. Until I am sure everything is alright, I will keep the api reference available through the link above.
     
    Last edited: Jun 22, 2020
    ysshetty96 likes this.
  32. ysshetty96

    ysshetty96

    Joined:
    Feb 27, 2019
    Posts:
    101
    It's working now, thank you.
     
  33. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298
    Hey @Aka_ToolBuddy

    What does the future of Curvy look like? Are there any plans or a general roadmap you are looking at?

    I just wanted to ask this as I feel like Curvy needs some usability upgrades. The tool has been getting updates but I feel like there are some other areas that need to be looked at. I'm sure you are aware of this, but Curvy is a bit "clunky" to use right now. Overall I'm happy with it's API and functions but it's lacking in other areas. I think the graph editor is probably the area that needs attention the most, below are some examples.

    1. The graph editor gets very slow after using more than 4 nodes. This seems to be tied to how the nodes are draw in GUI and "collapsing" them helps but it still gets pretty sluggish.
    2. The graph editor will randomly disconnect things while I'm clicking. If I start panning, zooming, and clicking around very fast, it's like the graph editor can't keep up. Every other click a "wire" is randomly disconnected and teleports to where I clicked as if I've dragged the wire out when I'm nowhere near it.
    3. The graph editor is very one dimensional. I say this in the sense that it only likes being used a certain way. This ties into my point below. We should be able to have multiple inputs for various nodes like the spline path node. I don't get the idea behind limiting the user and making them create multiple of the same nodes just to achieve the same output that one node using multiple inputs can achieve. It would be much cleaner and much better performance wise.
    4. I've seen there has been a handful of requests over the years to allow us to use a single generator for multiple splines. The general answer you've given was to use templates. I think for simple stuff that is okay, but that becomes a big pain once you start creating lots of complex spline setups. For example, I'm building a train simulator. Say I make 1 spline and that has a generator with the track rail and bed. So I create a template that I'm happy with and start laying down a lot of splines and add the template to each one. What happens if I suddenly notice that the original template didn't have a boolean that I didn't check. Now I have to go through 100 generators to change that option. And sure, I can write a script to keep track of all my generators and change the values. But I feel like as a spline solution that promotes using generators, it would not only be 1000x easier to just let us input an array of spline paths to a single generator, but it would save users having to come up with solutions for something that should already be built in. I constantly feel like I have to "work against" Curvy to get the results I want.
    5. I think we also need more nodes in general. I think the graph editor could have a lot more functionality with more nodes that do specific things instead of hiding or restricting that functionality to certain nodes like Mesh creator node. For example, it would be useful to have a simple node that scales placed gameObjects based on an AnimationCurve, we already have this for the Mesh node.
    6. To add what I said above, custom nodes. I know it's already possible but it doesn't seem officially supported or encouraged. Adding support to let users create their own nodes would take a lot of work off of you. There is a mesh tool on the Asset Store that let's you do exactly that. They even setup a section on their forum where users can share and download each other's nodes. Amplify Shader Editor also encourages this heavily, and even adds the most useful/popular user created nodes to their packages. I feel like this is a missed opportunity.
    7. Extra stuff that isn't necessary but would help further down the line: Collapsed graphs (Wire's get very messy for complex generators), Reroute nodes (Double clicking a wire creates a reroute node for cleanliness, example), Portals (Basically just a fancy reroute node that let's you take the input of the wire and output it somewhere else in the graph so you don't have 100 wires crossing over eachother).

    And here is some general stuff I think would be good overall.

    1. Connection metadata. Currently for connections there doesn't seem to be any way to get metadata at that point. You have to call GetNextControlPoint when you've reached the end of your current segment. Not only that, you have to have one script for each CP that is part of that connection. Ideally we would have Metadata for that connection instead of polling each CP. Currently it seems connections are also hidden from the user by default. I assume "Hide _CurvyGlobal" will unhide that, but we would still need Metadata on that connection.
    2. Spline metadata. I think it would be useful to have general metadata for a spline so we can call Spline.GetMetadata<T> and store/read values for that whole spline instead of just the segment. Currently I'm just storing metadata for the spline on it's first CP, but I think this would be a better approach?
    3. More "specialty" example scripts. I've used other spline solutions and they have always included examples of how to do certain things that might not seem so obvious and I think that really shows they are willing to go a step above for their users. For example, things like lowering terrain under a spline or constraining an audio source to a spline. I personally don't think this is necessary or need it myself, but I know other users would definitely want to take advantage of this.

    There are some other things that are slipping my mind, but I'm sure I'll post them if I run into them again. Overall I'm happy with Curvy but I think it could use some work to be even better.
     
    rrahim likes this.
  34. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Hi,

    (The answer to your post will be very long, so I will divide it into small posts, for ease of readability and referencing.)

    Thanks for taking the time to write me about all what you thing should be enhanced with Curvy. Such messages help a lot deciding what to do next, especially that by working for so long on Curvy, I developed some blind-spots.

    There is no public roadmap for Curvy. I prefer it this way to be able to keep the freedom of changing direction if and when I see it fit. I do have a todo list, and some of your points are already there, but the priority of the tasks in that list can vary. I at all time have an idea about what to do next, but I reevaluate it after every release.

    Since I acquired Curvy from its previous owner, at the start of 2018, I mostly worked on enhancing the existent features. Creating new features was probably only 20% of my work. The remaining 80% were refactoring, bug fixing, optimizing, enhancing the API, and enhancing/replacing some UIs to make it clearer and easier to use.
    Now (version 7.1.1, still under Unity's validation process) that most what bothered me with the existing features is fixed (for example the undoing that was not working all the time), I will focus on adding new functionalities (such as your point 3 about the Curvy Generator). Of course I will still do maintenance work such as bug fixing, but I believe that there are waaaaay less bugs than a couple of years ago, so it should not take me that much time (I hope :D )

    This was the general answer. Next I will be speaking about CG specifically
     
    atomicjoe likes this.
  35. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Before acquiring Curvy, I was using it for my personal projects. Curvy Generator was definitely what made me love Curvy. I truly believe that it is what makes it stand out of its competitors. I do have a lot of plans for CG. After acquiring Curvy, I realized that a lot of Curvy's users (most?) don't use CG. CG is an advanced feature, and (at least in my experience) a sizable chunk of my customers are not advanced users. So I naturally spend more time on features that are used by most users, like the controllers or connections, but that doesn't mean that I abandoned CG. You can see through the release notes (my first release was the 2.3.0) that a lot was done to enhance CG. It's just that I did less than what I would have liked to. Now that I will work more on new features, I believe that a lot will be added to the CG.

    Next post will be directly answering the points you listed. It will take me some time to answer everything, so I preferred posting partial answers instead of making you wait for me writing all the answers before posting them.
     
  36. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    1. That's not supposed to happen. In example scene 25, the CG has 35 nodes and the editor runs smoothly on all the machines I tested with. I even tested a scene with around 200 node, and it was smooth. Have you checked if something is being logged into the console? Can you send me a reproduction case, and tell me what versions of Unity and Curvy you are using?

    2. This is probably related to point 1. With a low in editor FPS, clicks and drags are probably confused, and dragging a link on an empty space does disconnect the link. Let's fix point 1 first.

    3. I agree with you. Ideally we should have some "For each spline" node. That's on my todo list.

    4. That would be solved by point 3. But until then, know that you can:
    a. Make a prefab of your generator. That way you can modify all its instances easily.
    b. Search, in the editor's Hierarchy window, objects having a specific script by typing "t:ScriptName". That way you can for example search for "t:BuildShapeExtrusion", select all the resulting Shape Extrusion modules, and modify the value you want on all those modules at once.

    5. I agree, there is room for a lot of new nodes.

    6. Custom nodes are officially encouraged. You can create them through Project window → Create → Curvy → CG Module. That would create a skeleton class that you can fill. That skeleton has some comments to help you, and I agree it can have more comments. And since custom nodes work the same than official nodes, I am hopping that the source code of the official nodes being available, and through the API's documentation, people could make their own custom nodes. Of course, writing a full guide would be better, but that was never a priority in the past.
    Your idea about a forum thread or subforum related to that is a good idea. I had once posted in Curvy's official forum asking people that made a custom node and are willing to share it to send it to me. That post was not a success :D But still, your idea is interesting. I am adding it to the todo list.

    7.
    a. There is a "Collapse all" in the CG's toolbar. In combination with the "Reorder modules", you should have the result you want. Maybe you mean something else by collapsible graphs? Please let me know if so.

    b and c. Noted, thanks.
     
    Last edited: Sep 1, 2020
  37. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    And to answer your general points:

    1 and 2.
    a. Having metadata on connections and splines might be a good idea. Can you please tell me what scenario did you encounter where having metadata on CPs was not enough? You can write me privately if it involves sharing information you don't want on a public forum.

    b. Connections are not hidden, or at least not meant to. They are components on gameobjects children of the _CurvyGlobal_ gameobject. Since that gameobject is tagged as Don't Destroy On Load, Unity, and since several versions already, separate those kind of gameobjects from the regular ones when you hit Play.

    c. The "Hide _CurvyGlobal_" will hide that gameobject when you open a scene.

    d. Having connections being part of the _CurvyGlobal_ might be something I will change in the future. But of course, and as of all changes done before, this will be done in a way that does not break compatibility with scenes saved under older Curvy versions.

    3. I am thinking about ideas of other example scenes to add. Let me know if you have suggestions.

    Finally, thanks a lot for listing all those items, and feel free to share more with me.
     
  38. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    atomicjoe likes this.
  39. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    Hello there any chance for having a tutorial on creating a endless road generation system in runtime?
    I know theres an example scene included which is exactly do the same thing but there might be someone (myself) who dont know code very well and explaining in a video will help them much much better
    Thanks in advance
     
    Last edited: Sep 15, 2020
  40. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Hi,
    I am planning to do some more tutorials, but I will assume that the viewer has already some coding knowledge.
    Most Curvy Splines' features do not need coding, but for advanced usages you need to have some coding basics. So what I would recommend you is to spend some time to get just the basics, and then to learn by example by looking at the example scenes' code (the API is documented).
    Sorry if my answer is disappointing.
     
  41. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    Alright thanks
    But having more tutorial is a better way of even advertising your products features
    Thanks btw
     
  42. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    I agree. I have to put more time on the marketing aspect compared to before.

    If you have any question regarding Curvy Splines, which answer is not on forum.curvyeditor.com, feel free to post there or write me.

    Have a nice day
     
    Pourya-MDP likes this.
  43. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    atomicjoe likes this.
  44. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    C_p_H, timmehhhhhhh and atomicjoe like this.
  45. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
  46. mchangxe

    mchangxe

    Joined:
    Jun 16, 2019
    Posts:
    69
    I have a spline that splits into a second spline. Ive found that when my obj reaches the split point, onEndReach is triggered if it decides to travel the second spline. How do I make it so that on onEndReach is only triggered at the actual ends of the two splines???
     
  47. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Hi
    OnEndReach is triggered at every spline end, you can't change that (except by alterating Curvy's code of course). So what you should do is to handle, inside the event handler/listener, the distinction between the first spline and the second one.
    Was my answer helpful?
    Have a nice day
     
  48. mchangxe

    mchangxe

    Joined:
    Jun 16, 2019
    Posts:
    69
    Thanks, I managed to solve this by checking if the object is at the same position on the spline after x amount of time and changing the spline controller type to clamp. Got a few more questions tho:

    1. Is there a way to optimize FPS for large amount of objects (~400 sprites) that moves on a spline?

    2. Ive found that when I create a connection between spline points in prefab mode, the connections disappear when i drag the prefeb into the scene. So I guess the spline point connection configs are not saving???

    Thanks in advance. Looking forward to your replay.
     
  49. Aka_ToolBuddy

    Aka_ToolBuddy

    Joined:
    Feb 25, 2014
    Posts:
    536
    Hi,
    1- Having 400 monobehaviours, even if they do nothing, has its cost. So if you need extreme optimization, then the best thing to do is to use the API to make a single monobehaviour that will update all the 400 objects in the same update call. Other than that, reading this link might helpl: https://curvyeditor.com/documentation/performancetips
    Finally, use the profiler, and see the impact of different options on your game's performance. Try using caching, removing the spline orientation if not needed, ...
    2- Short answer: the connection is part of another gameobject, and not part of the spline gameobject, that's why. Long answer: https://forum.curvyeditor.com/thread-858.html
    I hope this helped
     
  50. mchangxe

    mchangxe

    Joined:
    Jun 16, 2019
    Posts:
    69
    Thanks,
    Regarding 1, what I am doing right now is instantiating 400 sprites and attaching a straight line spline to their spline controllers, then giving them a speed and then set the clamping to loop. When you say update all the 400 objects in the same update call, how do I achieve that?