Search Unity

[RELEASED] Ultimate spline solution

Discussion in 'Assets and Asset Store' started by Raed_Abdullah, Aug 5, 2014.

  1. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    Sorry for the late reply.

    let me get this straight you want to Instantiate some cubes then move them on splines to a specific location
    this is possible but you need to put some things in your mind
    1_ you can't create splines when there is no collider (just for placing the points)
    this gonna be fixed next release.
    2_ you need to tell the objects which spline to follow

    if that didn't help please tell me.
     
  2. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    Just to give you a quick update on the tool
    version 1.3 is almost done
    I'm aiming this time to add video tutorials and extend the docs

    the tool now feature automatic object placement :D
     
  3. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    Version 1.3.0 is being verified by unity

    it has cool new features like the object placement and more stable overall
    full release notes are coming soon :D
     
  4. Oriam

    Oriam

    Joined:
    Nov 11, 2012
    Posts:
    23
    Hi,

    Just bought your asset. I was wondering if there is a way (already implemented) to get the closest point (along the curve) on the spline based on a world position. I can think of it as a "clamp to the curve" kind of thing.

    If not, I think I can use GetPointAtTime from a code snippet you provided to another user, to begin with. I just want to be sure before I start doing something that may be already in the plugin.

    Thank you in advance.
    Best regards.
     
  5. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    Unfortunately there's nothing like that in this version of the tool

    You can absolutely do that with GetPointAtTime method but the catch is if you provide invalid numbers you can easily get errors from it

    This is a thing that I missed when I was developing the tool

    As if for now you can work around it by simply checking if the point you want to access has points after it

    Code (CSharp):
    1. if(spline[point index].subway.length > 0)
    2.  
    Because the tool was built to have many ways and sub splines, getting points from it is not easy as providing their index

    Subway is a list that holds indexes of points that come after the current point
     
  6. bromske

    bromske

    Joined:
    Sep 11, 2012
    Posts:
    28
    Can i create splines at runtime?
    Can i connect splines at runtime?
     
  7. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    Yes you can create splines at run time
    you can connect points at run time
    but if you mean merging 2 splines I don't think this will be very easy
     
  8. jhample

    jhample

    Joined:
    Jul 7, 2012
    Posts:
    44
    I am having an issue where my objects will occasionally loop around 2-3 times before going around a point (sometimes randomly in between points). I thought maybe my curves had a weird angle, but it even happens with straight lines. Is there something that I may have set wrong? Or is this a common issue?
    I am using the Move Object script.
     
  9. jhample

    jhample

    Joined:
    Jul 7, 2012
    Posts:
    44
    Nevermind, totally my fault. The object had a weird pivot point since it had multiple nested objects. Seems to be much better now.
    I would like to suggest a "Next Point" option to quickly get to the next index value. I know that you don't have to follow logical ordering with branching paths, but having the option would be nice. I have a large level and the points are far apart so it takes a few seconds of scrolling around the level to find the next point. It would be very helpful if I could just hop straight to it.
     
  10. CGPepper

    CGPepper

    Joined:
    Jan 28, 2013
    Posts:
    112
    I still get an exception every time i make any changes to a spline (resolution for example). After each change i have to restart unity to fix it.
    Also, 2 points are too close to each other, or resolution is increased, the object just rotates in circles around 1 position . I suggest taking the longest distance between 2 points and using that as a reference to dynamically scale sub divisions in smaller segments.
    Atm, if you have a lot of short turns and after a long stretch, you would have to add a lot of dummy points to a straight line to achieve consistency in resolution.

    Is there documentation with all features, for example, how do i use GetPointAtTime or can i find out how hard the curve bends at a certain position . Or should i just puzzle it out from the samples?
     
  11. kaffiene

    kaffiene

    Joined:
    May 26, 2013
    Posts:
    21
    I am having real problems getting objects to move along splines. I have a path with a couple of branches. Sometimes objects round the corners fine, sometimes they jiggle or go around in circles. I don't understand what's going wrong. How do you fix these issues?

    I've attached an image of how I have the branches are arranged.
     

    Attached Files:

  12. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    Hi,

    Do you have an gravity 'auto follow terrain' option? I mean an option that allow us to place an waypoint on a terrain (or mesh) by gravity : auto fall, fallout, drop, auto vertical raycast etc...
    This option is missing on almost packs of the store. :rolleyes:
     
    ThunderTruck likes this.
  13. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    try to press "G" ;)
     
    ZJP likes this.
  14. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    if the object is moving fast enough this problem may occur
    you can work around it by changing the speed or the offset in the follow spline component
    also the resolution in the spline it self can make a difference
     
  15. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    Of course... Thanks... :p
     
  16. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    not clearly sure

    it doesn't appear in your asset store downloads ?
     
  17. dclarknscad

    dclarknscad

    Joined:
    Jul 30, 2015
    Posts:
    2
    I bought this plugin and am following the tutorial. The cube is falling off the spline at the intersection between paths
     
  18. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    Yes it's totally possible
    if rotating the object is causing some troubles you can make the camera a child of the object that follow the spline so it can rotate freely without affecting the movement
     
  19. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    I don't get what's happening can you explain more please?
     
  20. dclarknscad

    dclarknscad

    Joined:
    Jul 30, 2015
    Posts:
    2
    I managed to get it fixed by adding more subdivisions.

    A problem has occured - I have exported the spline in a scene package and imported it into a new one, but now the Spline Tools doesn't work anymore (the window). I am trying to add more subdivisions, but the window is empty and the error says "NullReferenceException: Object reference not set to an instance of an object"



     
  21. n06rin

    n06rin

    Joined:
    Aug 12, 2014
    Posts:
    1
    Hi! I making a something like railroad game. And you spline asset is quite enough, but i have a real strange behaviour.

    If i use
    GetComponent<FollowSpline> ().ReverseMovement ();
    My object not move reverse, it just go to the pre-previous spline node. And it move just straightforward, without spline-maded way.
     
  22. AlterDUDE

    AlterDUDE

    Joined:
    Mar 21, 2015
    Posts:
    1
    Hello Raed,
    i just bought your spline plugin, but i'm having some troubles with a
    specific issue.

    i need to intantiate at runtime multiple copies of the same asset (which has a
    spline attached) and i need the follower to change the instance to be
    followed.

    the problem is that i'm creating an istance of the spline asset using
    CreateSpline(Spline other), and i get weird movements along the new spline.

    is there a specific way of doing this that i'm missing?
    thanks in advance for the support!
     
  23. ATLAS-INTERACTIVE

    ATLAS-INTERACTIVE

    Joined:
    Mar 3, 2014
    Posts:
    1,295
    This looks like more or less what I need, but I have a few questions first.
    1) Can you individually move the objects placed on the spline after they have been placed?
    2) Can you add height variation?
    3) Is it possible to statically place them, so the spline is no longer needed?
     
  24. johanesnw

    johanesnw

    Joined:
    Dec 11, 2013
    Posts:
    53
    wow. I didn't know this tool exist. while I screwed myself with iTween Path system.
    wanna ask something ridiculous. does physics movement also follows the curve?
    like, my character punch so hard it sends the enemy flying away, or my character wants to throw grenade, but the enemy/grenade still follow the stage curve while being affected by the gravity/force. (let's say I'm using AddForce)
    if it's impossible, is there any solution to achieve this?

    definitely buying this when I get home :))
     
  25. Taurris

    Taurris

    Joined:
    Aug 13, 2012
    Posts:
    14
    Hello Raed,
    I was thinking if you could add an option to switch to simple catmul rom splines, please ? Sometimes it's just easier to work without bezier handles.
    Second thought, it's just a minor thing but quite annoying. When using the "drag" for modifying the spline, I have to first click-select the node or handle, then I can move it. It's quite annoying when you want to quickly adjust several nodes. Is it possible to make it work without the first click, so that when I click&drag, it already starts to move the node ?
     
  26. Divistri

    Divistri

    Joined:
    Oct 1, 2015
    Posts:
    9
    Hey Raed!

    I bought your Spline Tools and they are amazing! However, I am having the exact same problem as n06rin and Marscaleb with a bug in reversing the movement of an object. I think there is a serious bug with reversing movement or how you want people to reverse movement isn't intuitive. This is the exact method to create the bug.

    1. Create a spline in a circle shape

    2. Attach an object to the spline

    3. Have the object move along the spline

    4. Pause the object's movement in between two nodes

    5. Reverse the object's movement

    6. Resume the object's movement

    7. The object does not follow the spline path in reverse. It takes a direct path to the previous-previous node


    8. The desired or intuitive functionality is just to follow the spline path back, regardless of nodes.

    This is causing huge problems in the game I'm programming right now so I hope you can make a quick fix or people can find a temporary solution to this frustrating scenario.

    Thank you!
     
  27. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    I'd recommend sending emails to get faster respond

    anyway
    @dclarknscad :
    try to reassign the spline in the spline object

    drag&drop it from the inspector


    @n06rin
    You can add extra points to make it work as it should
    I fixed this issue and it should work as expected in the next update
    if you want the fix now replace the current ReveseMovement function with this
    Code (CSharp):
    1. public void ReverseMovement()
    2.         {
    3.             if (_currPoint < spline.Length - 1 && !reverse) _currPoint++;
    4.             else if (_currPoint > 0 && reverse) _currPoint--;
    5.  
    6.             reverse = !reverse;
    7.         }
     
  28. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    @AlterDUDE
    I beleive you should call function called SetWorldPositions in SplineWindow.cs script
     
  29. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    yep
    yep
    and yep

    it creates the objects and add them to the scene
    so you can say it's a faster way of organizing objects rather than a custom spline mesh or so
     
  30. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    @johanesnw
    it's cannot do that exactly using AddForce
    but it works in a way that it will provide the position on the spline that you should go to
    and you can move your object in anyway you want to

    @Taurris
    thanks for your feedback :)
     
  31. idlemurmurs

    idlemurmurs

    Joined:
    Apr 9, 2014
    Posts:
    12
    I guess I just wished to reach to thank you for all the dedication and commitment that must have gone into this, since it's truly been a stellar addition to the unity framework, and I adore being able to just prototype animations out on such a whim - thank you!

    I suppose I was only wondering how I would possibly access the Spline attribute within a standard script, or what assembly reference may be needed to so do, since at the moment it's simply coming up with the following error:
    The type or namespace name `Spline' could not be found. Are you missing a using directive or an assembly reference?
     
  32. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Before purchasing your asset I want to ask if it`s possible to implement a feature I need, or maybe it`s already possible, by using your asset, to do what I need. What exactly I want to do? I need to move the camera, or an object in the scene along a spline/bezier curve/path by using finger gestures. The camera/object needs to move up and down along the spline, not based on a time line, but moving according to finger swipe (or click&mouse move on desktop) fro,m left to right or the other way around, from right to left depending on the swipe direction. I`m not sure if this can already be done inside Ultimate Spline Solution, or it can be implemented, or it needs integration with another Unity asset, like InControl, Easy Touch or Finger Gestures. I have to mention that my main target platform is windows desktop, but I would love to have this working for any kind of touch screens too, mobile or not.
    Also, I have to mention that I have no scripting knowledge, and a no scripting solution would be great, or using Playmaker actions will do too.
    Thank you in advance for your time and answer.
     
  33. lordubik

    lordubik

    Joined:
    Feb 18, 2013
    Posts:
    67
  34. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    Thanks :)
    and sure you can access the spline class just add using SplineTool; at the top of your script

    The tool works in a way that you make a spline and in the code you will get the next position that you should be moving to in the spline
    and you can reverse the movement
    and you can write any code to use this information to move the object the way you need :)
    hope that helped

    you can adjust the resolution of the spline and the offset in the followspline component to get a better results
     
  35. Kvart

    Kvart

    Joined:
    Nov 26, 2015
    Posts:
    13
    Hey.

    I bought your tool not so long ago, and it's been working perfectly fine, doing the job as it should.

    I have a couple of questions:
    Is it possible to get the distance an object have travelled along the spline in percentages?
    Also is there and API reference somewhere?

    Cheers.
     
  36. AlexGorcea

    AlexGorcea

    Joined:
    Aug 20, 2013
    Posts:
    22
    Hey,

    Any plans to release this for 5.3?
     
  37. Ruekaka

    Ruekaka

    Joined:
    Sep 12, 2014
    Posts:
    119
    Hello,

    Is it possible that something went wrong with the new release?
    It shows the Buy button allthough I bought this tool already.
     
  38. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    that's pretty weird
    when I uploaded the update it accepted it as a new asset although I uploaded it with the same name and a note that it's just an update for an existing tool

    I'll reupload it and hopefully it will update correctly
     
  39. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    Version 1.4 is released with some important fixes
    Things discussed here in the forum like reverse movement
    And overall stability
     
  40. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    new overview video
     
  41. Tophies7

    Tophies7

    Joined:
    Oct 9, 2013
    Posts:
    1
    Hi Raed, we have been using your asset for the last week or so in our new project (longer in some of our other games). However we are getting an error since updating to the new version.

    SplineTool.SplineAssetEditor.RenderStaticPreview (System.String assetPath, UnityEngine.Object[] subAssets, Int32 width, Int32 height) (at Assets/Spline Tools/Editor/SplineAssetEditor.cs:59)
    SplineTool.SplineAssetEditor.OnEnable () (at Assets/Spline Tools/Editor/SplineAssetEditor.cs:22)

    The specific line is "EditorUtility.CopySerialized(t, tex);"

    Has anyone else encountered this?
     
  42. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Hi. I was wondering if its possible for you to make it so that you don't need to rotate the meshes like you did in your demo video? So when they are on they are connected to each other on the ends and twist around. Like if I wanted to make a road or water plane and attach to the spline they will n ot have breaks between them.
     
  43. CGPepper

    CGPepper

    Joined:
    Jan 28, 2013
    Posts:
    112
    @Raed_Abdullah The spline doesnt seem to work in the latest version of unity
     
  44. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    That's strange I have the latest version and everything seems to be working fine
    can you give me the exact problem ?
     
  45. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    These kinds of effects needs some changes to be made to the mesh itself which is not available in this tool
     
  46. Dragon_AV

    Dragon_AV

    Joined:
    May 8, 2015
    Posts:
    5
    Edit: It works, but adding the 0 point of the spline does not work on custom meshes, it did on a standard quad though.
     
    Last edited: Apr 8, 2016
  47. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    I don't fully understand what your problem is but I'll try to help
    The system checks for collider when adding a point so if the custom mesh doesn't have a collider you can't add point on it
    the non-collider way of adding points is by the hot key I believe Shift+A
    The thing is you can check the hot keys and change them via the tool preferences that you can find under edit>preferences>SplineTools
    Hope that helped
     
  48. VoxGuy

    VoxGuy

    Joined:
    Jul 30, 2013
    Posts:
    9
    Hi, we've just started using Spline Tools, but from what I can see, the reverse still hass this bug where it skips one point and heads straight for the next one without following the path. It's actually a major problem, as we ended up choosing this asset from the store on the assumption the issue was sorted.

    Basically all we're doing is telling it to reverse depending on player input and using the arrow callback, without any changes to the followSpline script.

    Thanks in advance for your time and help.
     
  49. Raed_Abdullah

    Raed_Abdullah

    Joined:
    Aug 5, 2014
    Posts:
    50
    That's kinda wierd it's working as far as I tested can you please explain the problem
     
  50. PlayNicelyLtd

    PlayNicelyLtd

    Joined:
    Aug 8, 2013
    Posts:
    2
    I'm encountering a major bug with the spline creation tool. When I hold down the control key to add a point, it adds hundreds of points before I even click, and continues to add points as long as control is held down.

    (See screenshot below.) I am using Unity 5.3.3.

    Any thoughts?

    splineBug.png