Search Unity

Ultimate Rope Editor - New powerful rope physics for Unity3D [RELEASED]

Discussion in 'Assets and Asset Store' started by UGTools, Feb 11, 2013.

  1. CAwezome

    CAwezome

    Joined:
    Feb 10, 2015
    Posts:
    1
    Hey!

    I'm trying to use your plugin to create a fishing line, specifically for angling. Two problems keep occuring:
    1. It never stops swinging after some force has been exerted on it. Is there a variable which will make it stop swinging earlier?
    2. When exerting a lot of speed on the rope-start (i.e. when moving the tip of the rod quickly), the rope kind of breaks and starts to scrounge up. After this is done, I have to restart to make it go back to normal.
    So far I've been playing around with values of joint mass, spring value, damping value, and floater (that which is at the bottom of the line) mass.

    Any tips on how to make the perfect fishing line?
     
  2. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    You mean the actual rope length, and not the Euclidean distance between rope start and rope end?
    You can get it by using

    Code (csharp):
    1.  
    2. UltimateRope rope = ropeGameObject.GetComponent<UltimateRope>();
    3. float fRopeLength = rope.RopeNodes[0].fLength+ rope.m_fCurrentExtension;
    4.  
     
  3. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    What is the Link Mass value?
     
  4. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    1. I would maybe try to add a little bit of damping and increasing the Link Joint Spring and Link Joint Max force values. Also play a little bit with the Link Mass

    2. Increasing the spring and max force should improve this, as physics tend to go haywire when these values are too small (link joint spring & link joint max force)
     
  5. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    It's been two months; is there an ETA for when this will be fixed?
     
  6. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    It's on my TO-DO list for this weekend :)
     
  7. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Update should be available this week!
     
  8. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Version 1.18 has just been submitted to the asset store for review!
     
  9. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    hi there. v.1.16
    seems prefab enable doesnt work properly.
    trying to prefab rope, but after prefabing second rope i missig previous.

    also have this error

    NullReferenceException: Object reference not set to an instance of an object
    RopePersistManager+RopeData..ctor (.UltimateRope rope) (at Assets/ExternalTools/UltimateGameTools/RopeEditor/Scripts/UltimateRope.cs:48)
    RopePersistManager.StorePersistentData (.UltimateRope rope) (at Assets/ExternalTools/UltimateGameTools/RopeEditor/Scripts/UltimateRope.cs:123)
    UltimateRope.CheckSavePersistentData () (at Assets/ExternalTools/UltimateGameTools/RopeEditor/Scripts/UltimateRope.cs:4134)
    UltimateRope.OnApplicationQuit () (at Assets/ExternalTools/UltimateGameTools/RopeEditor/Scripts/UltimateRope.cs:688)
     
  10. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Version 1.18 has just been accepted!
     
  11. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Is there any way to measure the length of the path of a rope? I know how to get at the length values in the inspector, but I'm trying to find graceful ways to keep the rope from being over-stretched and freaking out.

    With a straight rope between two points, this is easy; just measure the distance between the start and end objects and optionally multiply it by a little fudge factor to get the desired length of the rope, then use the built-in extension system to make sure the rope is long enough. No big deal.

    But it doesn't work if the rope's path is curved. For example, let's say you have a rope that's wrapped around a pillar. The rope could need to be 10 feet long, yet the starting and ending points may only be 3 feet apart. In that case, the simple distance check will result in a rope that's way too short, and freak-outs will occur.

    Is there any way to measure down that curved path, to see how long the rope wants to be to follow that path? Or, to get at the problem another way, is there a way to know that a rope is about to freak out, so that I can extend it before that happens?
     
  12. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Yes, I usually compare

    Code (csharp):
    1.  
    2. UltimateRope rope = ropeGameObject.GetComponent<UltimateRope>();
    3. float fRopeLength = rope.RopeNodes[0].fLength+ rope.m_fCurrentExtension;
    4.  
    To the actual path the rope has. Either the euclidean distance between Start and End if the rope is stretched linearly, or in your case the curved path. If fRopeLength is greater than this value everything is OK, if not then the rope is stretched beyond its length and will freak out :)
     
  13. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hi guys!

    We are running a contest on our Facebook page where you can win one of our licenses (Fracturing & Destruction, Rope Editor or Concave Collider). Check it out!

    https://www.facebook.com/ultimategametools
     
  14. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    That's what I already do for the linear case. I guess the thing I don't know how to do is get the length of the curved path. Is there a method for doing that easily? Or even not easily?
     
  15. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    To compute the path length I probably would traverse all links and sum the distance between them, to check if this value is higher than the actual rope length.

    I don't have access to the sources right now but all links should be in rope.RopeNodes[0].links or something like that :)
     
  16. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Hello, I am getting build errors while building for Windows Store or WP8.1
    To reproduce you may need to set "Use Net Core" in player settings.

    Assets\Ultimate Game Tools\RopeEditor\Scripts\UltimateRope.cs(127,55): error CS1061: 'System.Type' does not contain a definition for 'GetFields' and no extension method 'GetFields' accepting a first argument of type 'System.Type' could be found (are you missing a using directive or an assembly reference?)

    Assets\Ultimate Game Tools\RopeEditor\Scripts\UltimateRope.cs(194,55): error CS1061: 'System.Type' does not contain a definition for 'GetFields' and no extension method 'GetFields' accepting a first argument of type 'System.Type' could be found (are you missing a using directive or an assembly reference?)

    Thanks.
     
  17. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hi Meceka,

    I will take a look at it. Those lines can be excluded from a build, they only are needed on the editor.
     
  18. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
  19. songxue77

    songxue77

    Joined:
    Sep 22, 2013
    Posts:
    2
    Thanks for excellent assets. Can I ask for some questions about this?

    For now, I want to use this rope as electrical line in a virtual circuit. So Can I increase or decrease the length of rope in Runtime by using mouse? Like as, I click start-point of rope and drag, then rope will be lengthened. Is it possible?

    Thanks.
     
  20. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Yes, it is possible. You just need to check the distance between the rope start and the mouse position. If the length is greater than the current rope length, then you can extend the rope the amount needed
     
  21. songxue77

    songxue77

    Joined:
    Sep 22, 2013
    Posts:
    2
    Thanks for your reply.

    I have some more questions about it.

    Maybe somebody asked this question before.

    1. Can I create a new rope and set all of the values(the values in rope attribute window) by script?

    2. And how can I set the RopeStart(start point gameobject) and Segment End(end point gameobject) using my specific gameobject?

    Sorry for lots of questions. Thank you for reviewing~
     
    Last edited: Jun 10, 2015
  22. fivebits

    fivebits

    Joined:
    Feb 4, 2015
    Posts:
    9
    Hi @UGTools,

    We recently bought the plugin and I have a few questions.

    We want to make a jump rope. I want to rotate the whole rope around a central axis, like a real jump rope. I tried doing this by rotating the gameobject that contains the rope component, but I get very unstable results.

    I have a feeling it's going to be difficult to achieve this with real physics, but I'm going to give it a try. If you could give me any recommendations, that would be great.

    - Ricardo
     
  23. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hi there!

    1. Sure! just instantiate a new GameObject, add a new UltimateRope component by using:

    Code (csharp):
    1.  
    2. UltimateRope rope = gameObject.AddComponent<UltimateRope>();
    3. rope.parameter1 = ...
    4. rope.parameter2 = ...
    5. rope.parameter3 = ...
    6. rope.Regenerate(false);
    7.  
    2.

    by using

    Code (csharp):
    1.  
    2. rope.RopeStart = yourStart
    3. rope.RopeNodes[segment].goNode = yourEnd
    4.  
    Here segment would go from 0 to n, depending on the number of segments you created.

     
  24. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hi Ricardo!

    It's a hard task since physics are usually very difficult to control, and you want predictable results :)
    Can you send me a screenshot of your parameters?
    I usually first play with the link mass value and start increasing link joint max force and link joint spring parameters until I get more or less the behaviour I want. But it is a lot of finetuning and testing :)

     
  25. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Hi, does it support unity wind system?
     
  26. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    No, Unity's wind applies only to vegetation if I remember correctly, not to rigidbodies. Now that you say it, somebody mentioned it to me once and I think adding that functionality shouldn't be too hard :)
     
    ksam2 likes this.
  27. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    has anyone else had a problem with the "import bones" rope type? every time I use it, it just keeps making the rope stretch as it keeps falling and continues on forever. can't really use it for hair or other loose extremities. any suggestions on how to fix this?
     
  28. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hi Therian,

    You need to specify the top rope bone is static and attached to the body using the static bone list parameter. Otherwise all bones are "free" and will start falling and tretching.

    For example, if your bones are bone00 to bone10, and bone00 is the bone that attaches to the body, then the static bone list should be set to 0. You can specify more than one bone using commas or dashes (f.e 0, 1, 2 or 0-2).
     
  29. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    got it. thank you. :)
    What about when the hair goes berserk? like richocheting everywhere?
    I thought I would try it out on a tentacle, and it follows alright, but eventually it starts going ballistic, when I move or turn.
     
  30. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    nevermind, think I found the problem. I had a script that was making the rigidbody kinematic. Seems to be doing alright now though. I'll test it some more just in case.
     
  31. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Hi again, any progress with wind and rope?
     
  32. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    hmm. it still seems to do it. not as extreme, but it still whips around like crazy sometimes.... it just stays within its size, instead of stretching to horrible proportions.
     
  33. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hello there!

    I'm finishing another asset, which is the #1 priority right now. It should not take long, as soon as I've finished it I will try to implement this new feature.

     
    ksam2 likes this.
  34. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Try increasing Link Joint Max Force and Link Joint Spring to the same value (try 10, 100, 1000 or higher values), until it behaves like you want.

     
  35. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    I've tried your suggestion. it still decides to go wild.. Strangely, if I lower the link solver iterations, it seems to help a lot with it, although it is possible for it to still happen.
     
  36. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
  37. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I don't usually use twitter but thought this was too good an opportunity to pass up
     
  38. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Hi,I have a rope that is extended at start, then I wish to retract, but based on your LogicRopeWithCoil.cs script example, I only can get the rope to extend further out, not in..
    I am trying to set a parameter on how far the rope is extended at start.. but I fail..
    Can you give me an example code?
    upload_2015-7-9_16-0-45.png
     
  39. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    web76,

    Sorry for the ultra-late reply. I just noticed there was an unanswered question here :)
    If you need quicker assistance you can use info@ultimategametools.com

    Regarding your question. There currently is no way to start the rope extended I'm afraid, it has to do with the way Unity physics work. Since some people have been telling me the same lately I will try to figure out a way to do it without extending the rope manually during the start...
     
  40. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Hi, just as an input, other rope packages can do it, so in some way or workaround it can be done..
     
  41. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    I also noticed that the weight/mass on the end of the rope doesn't transform to the tip of the crane, probably because of the kinematic calculated, startpoint of the rope...
    maybe you cold attach the rope with an joint instead, the reference point also?
     
  42. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    It does if your startpoint has a dynamic rigidbody component. You can then attach this gameobject to the crane using a fixedjoint

     
  43. Roman_Malkov

    Roman_Malkov

    Joined:
    Jun 7, 2014
    Posts:
    2
    Hello. I have problem with ropes. I create a Procedural Rope. sometimes the rope is going crazy and that's what was happening to it. it happens when my character pushing wheel with rope


     
  44. butasimeji

    butasimeji

    Joined:
    Mar 18, 2015
    Posts:
    2
    I want to use ImportBones ropes with the value of gravity positive but it doesn't work properly.
    Bones behave crazy like this screen shot.
    Could you give me some advice?
     

    Attached Files:

  45. Kelos

    Kelos

    Joined:
    May 27, 2014
    Posts:
    12
    Hello,

    Is it possible to configure rope so it stops moving much faster, after it is disturbed (about 2-5 seconds) ?
    1) I Need to simulate more stiff behavior, like cable.
    2) And i want to disable physics on rope after it stops to move, but now it can move about 1 minute after i touch it.
     
  46. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hi there!
    Could you send me the models?
    The colliders diameter is extremely thin (0.000001), is there a reason for that or are the meshes so small?

     
  47. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    For stiffer ropes I would set Link Joint Spring and Link Joint Max Force both to the same value and test with 10, 100, 1000 and so on. Higher values mean more stiffness.
    For the second part I would add some damping value probably. It is 0 by default if I remember correctly.
     
  48. butasimeji

    butasimeji

    Joined:
    Mar 18, 2015
    Posts:
    2
    After I make colider diameter appropriate value, ImportBones ropes works priperly.
    Thank you!

     
  49. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    Hi there... I just got the Ultimate Game Tools package.... including the rope editor.

    I want to create a pendulum, to wich I will apply external forces.

    Basically I've already did a version using a skined mesh and attaching unity joints to each segment of the rig.

    But I want to be able to use this plug in... but I'm having a hard time understanding it.

    I tried to make a procedural rope, but when I hit play it starts to do weird things.
    Then I changed the rope segment to exactly the lenght between the end and star points, and it works, but it has to be the exact value, a little more or less and it breaks again.
    Also, the End and Start are Static.

    So I'm not understanding how this should be set up to fit my needs.

    Basically I want just the rope to be attatched at a fixed point on the top, and the rope to be able to move around, but Only in 2D space... If possible I want to fix the rotations on the Z axis... and also I want the end of the rope to be free.

    Any idea on how to achieve that?

    I want to make a character swing on the rope, like Tarzan or Spiderman or something like that.
     
  50. MeTheOo

    MeTheOo

    Joined:
    Dec 14, 2014
    Posts:
    22
    Regenerate(true); will remove the assigned material in skinned mesh render. Is that intended?