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. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    633
    Sorry if this has already been answered but how is performance for mobile? I only want one rope in my game at a time for instance.
     
  2. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    You should have no problem, it has already been used succesfully in mobile apps :)
     
  3. siliwangi

    siliwangi

    Joined:
    Sep 25, 2009
    Posts:
    303
    Site webplayer is down?
     
  4. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Yes, it seems we experienced some downtime this last night. Sorry for the inconvenience!

     
    Last edited: Jul 27, 2013
  5. Nifflas

    Nifflas

    Joined:
    Jun 13, 2013
    Posts:
    118
    I just purchased Ultimate Rope Editor and tried out the test scenes.

    Tried the "rope with coil" one. Oh, by the way, I'm on a macbook and don't have the numeric keypad, you may want to change the default keys, I had to reassign them. Anyway, I extended the rope a bit and suddenly they go all evil and jarring:



    The pieces are stretched, the rope isn't extended nearly that much.

    Since it's in an example file, I'd expect it to show me things that work or explain why something doesn't. Right now I can't tell if Ultimate Rope Editor is semi-incompatible with Unity 4.1.5, if the weight of the rope is too heavy for itself, if I need to change some of my project's physics settings (I'm using the default ones), or if there's another problem.

    Seeing an example scene bug out is a bit scary. Basically, I want to understand what happens and how I can use ropes in a way that's guaranteed where this will never happen in the end product. Some more documentation about this topic would be great.

    Finally, even though it's listed as fixed, I still get warnings about a script using deprecated method SetActiveRecursively().
     
    Last edited: Aug 1, 2013
  6. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    I was also starting to get pretty annoyed by those warnings and ended up fixing those myself (even though I read on this thread that it was supposedly fixed). You just have to open the incriminated script and replace all the instances of GetChildCount() with childCount (without the parenthesis).

    Hope it helps...
     
  7. Nifflas

    Nifflas

    Joined:
    Jun 13, 2013
    Posts:
    118
    Thank you! That will work until the next version becomes available. As for the erratic rope behavior, it's clear that PhysX doesn't handle too much stress on joints, so I guess it's not Ultimate Rope Editor's fault. Never the less, if one of the example scenes actually has this problem if you extend the rope enough, it would be very nice if it explains why it happens and show some ways to prevent it.
     
    Last edited: Aug 4, 2013
  8. UGTools

    UGTools

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

    Sorry for not getting back to you earlier.
    The rope coil keypad control was changed for the online weplayer for that specific reason but it is true that the sample scenes have not been changed. I will do that for the next update.

    About the rope stretching beyond the limits, it turns out to be the CPU not being able to keep up with the physics (in the Unity Pro version you can check it using the profiler), but it happens only in the editor and if the rope is selected and the GUI is being repainted in the inspector window.
    For some reason it takes the CPU a lot to repaint the custom rope window inspector and physics steps are being skipped to mantain the framerate.
    If you do it with no rope selected the framerate goes way smoother. On builds I don't experience any problems.
    Anyway, since it is a sample scene I will take a deeper look if I can make it work even in the worst case scenario. I agree this should not happen in any case.

    The SetActiveRecursively() warnings are a unity 3 vs 4 compatibility issue. Even if the documentation states you do have a UNITY_4 compiler preprocessor directive which should work for 4.xx the reality is it doesn't. I thought it was fixed but it did not work.
    I will now try to do it the other way around, by default using the one that works for Unity 4.0 and newer and keep support through preprocessor directives for Unity 3.

     
  9. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Yes and no. It is true the implementation that PhysX uses is horrible in my opinion (other physics libraries use much more stable implementations), but in this specific case it is way worse because physic steps are dropped. I will work on this specific scene though.
     
  10. HKSpadez

    HKSpadez

    Joined:
    Apr 24, 2013
    Posts:
    87
    Hey there. I have a quick question regarding how I could get this one thing working.

    I'm trying to use your rope to make a grapple hook. Is it possible to (in code) generate the rope. then have the rope increase and decrease it's length as the end point is moving?

    I wanted to have the start point as the player and as the player shoot the hook ( end point ) the rope would elongate till the hook hits a wall. and then pull the player to the hook by shortening the rope.. is this possible? and if so could i get a few hints as to how to implement this in code?

    also, is it possible to access the rope in javascript?

    thanks!
     
  11. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Yes you can, I think this series of posts: link can help you to start to do more or less what you want.
    Also, it is possible to access the rope in javascript, but you would need to move all the rope scripts to a folder called \plugins inside your asset folder.

    You will probably have more questions after reading the posts so don't hesitate to continue asking :)

     
  12. HKSpadez

    HKSpadez

    Joined:
    Apr 24, 2013
    Posts:
    87
    Hey there. I'm having a lot of trouble trying to access it in my javascript. so im guessing I need to make a gameobject and ultimaterope variable.

    I'm trying to do

    var ropeobject : GameObject;
    var rope : UltimateRope;

    rope = ropeobject.GetComponent(UltimateRope);

    but my system doesnt let me create the UltimateRope variable. i put the scripts in a plugins folder but it just doesnt seem to want to detect it.
     
  13. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Is this folder located in \assets\plugins?
    You should be able to use it via javascript moving the rope scripts located in Ultimate Game Tools\RopeEditor\Scripts to the \plugins folder.

     
  14. PlayingKarrde

    PlayingKarrde

    Joined:
    Aug 19, 2013
    Posts:
    38
    Hi there, I was wondering if this allows for the creation of bungee type ropes with elasticity? My specific use case is to create realistic ropes as seen in something like a boxing ring, but in order for that to work the ropes need to spring back to place.

    Is this possible? If not do you plan on adding that functionality in the future?

    Thanks.
     
  15. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    There is a little elasticity in the ropes and they spring back to place but you certainly can't do a bungee jumping simulator :) This is mainly a limitation of Unity's joints, they simply don't have this parameter.
    It just so happens that some months ago there was a guy that was using the Rope Editor to build a boxing ring but I don't have any news about his project. My guess is you can do it unless you really want to use the elasticity in extreme cases like WWE type of behavior.

     
  16. rainonrooftop

    rainonrooftop

    Joined:
    Apr 18, 2013
    Posts:
    6
    Hi, I've been using the editor for a few months now and have loved it so far. Great work and very concise programming.
    I'm using a procedural rope with coil and when I extend the rope then retract it very quickly it interacts with the cylinder around which the coil acts because it has a rigidbody. I've assigned the coil and cylinder layers so they will ignore each others physics but when I generate the rope procedurally from the coil its layer is set to default. How do I set the layer of the rope being coiled and uncoiled?
     
  17. UGTools

    UGTools

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

    Sorry for the late reply, I completely missed this post.
    You can assign the rope links a layer using the first parameter ("Rope Layer") but I guess you're already using that. Do you mean there are some links being reset to the Default layer when they shouldn't?
     
  18. rainonrooftop

    rainonrooftop

    Joined:
    Apr 18, 2013
    Posts:
    6
    Thanks so much for your response. I was assigning the Layer in the built in Layer for the rope and child nodes. Thanks again for your help.
     
  19. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Nice. I hope it's working now :)
     
  20. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Uploaded version 1.12 with a couple of bugfixes!
     
  21. Soapstar88

    Soapstar88

    Joined:
    Sep 20, 2013
    Posts:
    10
    Hi,

    First of all big thanks for this. I stopped a project 2 years ago due to the limitations of 'ropes' but now I can finally do something!

    I'm having a problem with breaking the rope under tension. From what i can gather you cant break the rope when the rope is 'extensible'. Am i correct in assuming this? Basically I need to be able to winch the rope AND be able to break it under tension.

    Thanks for any help.
     
  22. PrettyFlyGames

    PrettyFlyGames

    Joined:
    Aug 30, 2012
    Posts:
    74
    I've created a game called Crane 3D using the Utlimate Rope. I didn't completly finish it yet but still working on it.

    You can try a web version here: http://www.casualgames.nu/crane3d.aspx

    It runs on mobile devices with about 40 fps. But I've reduce the resolution slightly to be able to handle less powerful devices.

    And the game uses the Unity3D terrain which is known to have performance issues on mobile devices.
     
  23. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Yes, you can. There is no such limitation :)
     
  24. Soapstar88

    Soapstar88

    Joined:
    Sep 20, 2013
    Posts:
    10
    Hi UGTools,

    Sorry for late reply Ive been busy on another project. Thats good to hear there is not limitation however it doesnt work with me. The rope will only break under tension when 'Is Extensible' isnt selected. I need it to be extensible so i can control the length of the rope. Any ideas why this isnt working?

    Also do you know if its possible to read the length of the rope thats rolled out? For example in metres.

    Thanks for your help.
     
  25. UGTools

    UGTools

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

    You were right! for some reason it wasn't possible to create breakable ropes when the "Is Extensible" option was checked. It took me quite some time to find the bug but the good news is I fixed it and found a couple of other issues and improved some more.
    I've submitted the update as v1.13 and it's now pending for Asset Store approval. If you are in a hurry mail me at info@ultimategametools.com and I'll send you the update :)

    Cheers!
     
  26. realifant

    realifant

    Joined:
    Oct 24, 2013
    Posts:
    11
    Hi, all!
    Help me please to solve a problem.
    I`m doing a crane. When I put a hook with weight to the ground, it doesn`t stay at place, but starts moving.
    I use those parameters:
    The hook has mass = 100. The weight has mass = 300.
    $upload2.png
     
  27. UGTools

    UGTools

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

    I think what happens there is the rope is colliding with the hook, this can easily be checked by setting the "Collider Type" to None. You can try to set the anchor point higher or prevent rope<->hook collisions by using collision filtering (http://docs.unity3d.com/Documentation/Components/class-PhysicsManager.html).
    Also, be careful with the physics material you assign to the hook's rigidbody because I've had similar problems when making it slide across a surface. Normally I need to set the friction combine mode to Min and a lower friction value, otherwise it seems to get stuck and bounce randomly.

    If it's another issue tell me and we'll try to figure it out :)

     
  28. realifant

    realifant

    Joined:
    Oct 24, 2013
    Posts:
    11
    Hi, UGTools!

    I turned off the hook colliders and it stoped to shake randomly. Also I set "link mass" to smaller value (1) and hook with weight stoped to swing following the rope.

    Thank you very much for quick help! ;)
     
  29. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    No problem! by the way, your simulator looks really good, I'd love to see it finished and in action :)
     
  30. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    v1.13 now available at the Asset Store, go get the update!
     
  31. bobjung

    bobjung

    Joined:
    Oct 30, 2013
    Posts:
    1
    I bought a asset. (account: bob_jung@hotmail.com)
    But there is no sample for ImportBones.
    I don't know how to setup my skinned character with Ultimate Rope. :(

    Any tutorial? Any sample??

    Help me plz.
     
  32. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738

    Hi Bob!

    Send me an e-mail to info@ultimategametools.com and I'll give you one :)

    Which thing are you trying to give physics to?

    Say you've got a ponytail like http://youtu.be/h0-ftrWIvr0?t=1m4s

    The steps would be:

    -Drag the first bone of the ponytail (the one that links to the head) to the First Bone slot.
    -Drag the last bone of the ponytail (the one at the end) to the Last Bone slot.
    -As Static Bone List write the numerical suffix of the first bone (for example 001). This will keep the first bone "locked" to the head. If it is a more complex setup -like a hose that is attached at multiple points to a structure- here you will write all bones that are attached and won't move. The other ones will swing with physics. See the link below for the format when choosing multiple bones, ranges etc.
    -To set the colliders, play with the parameters, they should be quite straightforward to use and you can see the changes in the scene window.

    Here is some additional information on this parameters: http://www.ultimategametools.com/products/rope_editor/help#importbones
     
  33. realifant

    realifant

    Joined:
    Oct 24, 2013
    Posts:
    11
    Hello, UGTools! Help me, please, to solve another problem.

    After unity3d restart - a hook with weight doesn`t stay at place, but starts moving on the ground again. It looks, like a rope becomes more elastic.
    The problem solves, if I in rope settings set "segment end" to it`s end object. That is to say, if I just update "segment end" manually. After unity3d restart the problem appears again.
    I have tried to update "segment end" before the game starts using this script, but it didn`t help:

    [ExecuteInEditMode]
    public class endSet : MonoBehaviour {
    public Rigidbody ConnectedEnd = null;
    void Start () {
    UltimateRope rope = gameObject.GetComponent<UltimateRope>();
    UltimateRope.RopeNode ropeNode = rope.RopeNodes[rope.RopeNodes.Count - 1];
    ropeNode.goNode = null;
    ropeNode.goNode = ConnectedEnd.gameObject;
    rope.Regenerate(true);
    }
    }
     
  34. UGTools

    UGTools

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


    Can you send me an example project to info@ultimategametools.com please?

     
  35. realifant

    realifant

    Joined:
    Oct 24, 2013
    Posts:
    11
    Hi, UGTools!! I have sent you my project to email. Another problem I have noticed - if I set "length"=3 or "Rope Diameter=0.02" (I need this settings), rope becomes crazy ;)
     
  36. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Thanks! I'll take a look at it later today :)
     
  37. UGTools

    UGTools

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

    I took a look at your project. Some advices:
    -Ditch the 4 rope coils, they can't be seen and take a lot of unnecessary resources :)
    -All your 4 ropes have Link Mass set to 0.5, but the attachment (GameObjectEndXX) has mass = 100 and the even bigger object (podstavka_pod_shtir) has mass 2000. This makes the rope physics go bananas with little effort. Set the Link Mass of all 4 ropes to something like 100 and everything will look smooth.
    -About the rope length. If you set the rope length to 1, which it is now, set the Num Links to a value of 5 to have at least one rope link each 20cm (5*20 = 1m). This will make the rope look a lot smoother instead of angular.
    You can set the rope length to 3 or the diameter to 0.02 without any problem if you did step 2 (adjusting the link mass) :)
     
  38. realifant

    realifant

    Joined:
    Oct 24, 2013
    Posts:
    11
    Hello!

    Thank you for your advices.
    I set:
    - rope diameter = 0.02
    - has coil=off
    - length = 3
    - num links = 15
    - link mass = 100
    When I put weight on the ground (when rope is rolled off to full length) the weight doesn`t stay at place. It is moving. Big "link mass" makes it to move faster.
    Maybe you know, how to update "segment end" after unity starts, but before the game starts, using a script?

    I have sent you new scene to email.
     
  39. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    I didn't check the behavior of the big object with the ground. I'll take your new scene and do some testing.

    Do you mean the length of the ropes so that the object can start with a different height each time?
     
  40. realifant

    realifant

    Joined:
    Oct 24, 2013
    Posts:
    11
    I don`t need the object to start with a different height each time.
    I need "segment end" update before game start, because it helps me to solve a problem of weight moving.
     
  41. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    You need to start with different objects attached each time?
     
  42. realifant

    realifant

    Joined:
    Oct 24, 2013
    Posts:
    11
    No.
    I have a problem - when I put a hook with weight to the ground, it doesn`t stay at place, but starts moving.
    The problem solves, if I just update "segment end" manually to the object, which is already set as "segment end". That is to say, I make no changes to the rope settings, I only update it. But after unity restart, the problem appears again.
    I don`t know why, but it helps. It looks like a bug.
    You can see this in "scene_01.unity", which I have sent you.
     
    Last edited: Nov 6, 2013
  43. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    I see. I'll take a look again to see what is happening.
    Out of curiosity, to update it through scripting would be:
    Code (csharp):
    1.  
    2. UltimateRope rope = yourRopeObject.GetComponent<UltimateRope>();
    3. rope.RopeNodes[rope.RopeNodes.Count - 1].goNode = newSegmentEnd;
    4.  
    But you shouldn't need that, let's take a look at your scene and figure out why it's moving
     
  44. UGTools

    UGTools

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

    I can't put the weight on the ground in your scene, it just goes through the floor because there is no floor collider. Is this supposed to happen?
     
  45. realifant

    realifant

    Joined:
    Oct 24, 2013
    Posts:
    11
    Hi!

    No.
    There was collider. On my PC it worked.
     
  46. realifant

    realifant

    Joined:
    Oct 24, 2013
    Posts:
    11
    If not difficult, maybe, you`ll create a primitive floor collider on the floor, just for testing?
     
  47. UGTools

    UGTools

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

    Yes, it was a collision filtering issue.
    I asked you by e-mail if you could send me a captured video because with the current setup everything moves too slow on mi PC (Q6600) when the weight gets near the ground. Did you try to set up physics materials for both the weight and the floor? this way you can tweak bounciness and friction parameters.
     
  48. realifant

    realifant

    Joined:
    Oct 24, 2013
    Posts:
    11
    Hi, UGTools!

    Here is video capture -
     
  49. UGTools

    UGTools

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

    You are assigning the same objects again right?
    First try this: Instead of reassigning the 4 rope ends, try pressing "Reset Rope" on all 4 ropes and do the same ground test again. Reassigning the rope end forces a rope reset internally, and maybe there is some parameter set at runtime that somehow is being overlooked during edit-time. I want to check if this is the case.

    Also try setting a physics material to both the ground and the weight, with friction.
     
  50. TimB

    TimB

    Joined:
    Jan 19, 2011
    Posts:
    65
    Any plans on adding 2D physics support in Unity 4.3?