Search Unity

QuickRopes Rope Physics Tools

Discussion in 'Assets and Asset Store' started by reveriejake, Apr 20, 2012.

  1. vaticanwilliam

    vaticanwilliam

    Joined:
    Jan 6, 2014
    Posts:
    2
    Hey Jake,

    This is in relation to @anbaksai question above. I'm currently working on a 2D game with the new 2D physics in Unity with your Quick Ropes 2. I'm still pretty new to Unity so forgive my "noobness". Currently, I'm facing an issue where I have a circle collider on my player that I'm trying to roll across the rope, but the colliders do not interact with eachother. The ball falls right through basically. Is there some sort of reference you can point me in the direction of in making 2d ropes work with your Quick Ropes 2? I'd like to continue to use quick ropes, so if there is a way you now how to to make it work for a 2d platform game, that would be awesome.

    Thanks
     
  2. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    Hi! I like this package! I have few questions though. Is it easy to make ropes runtime? or even extend them?
    I get unwanted behaviour when i stretch the rope more then it should be stretched.

    Also I would like to have the setup so that when rope is attached to something when stretched/draggeed around it also pulls that object that is attached to. Currently I have the situation where object which has the rope attached to itself is like a 1 ton rock, it does not move but it should (it has a rigid body etc..and it properly moves when hit or something like that)

    I would appreciate if you could point me in the right direction about this!
    Thanks!
     
  3. par-002

    par-002

    Joined:
    Jul 4, 2012
    Posts:
    52
    Bought this the other day in order to create a Fishing Line. I am trying to do it via code instead of the Unity IDE. Here is what I got so far (works pretty well):

    Code (csharp):
    1.     private void createRope() {
    2.         rope = QuickRope2.Create(castingPoint, preCastLineEnd, BasicRopeTypes.Line);
    3.         rope.mass = 0.05f;
    4.         rope.drag = 1.0f;
    5.         rope.angDrag = 0.05f;
    6.         rope.useGravity = true;
    7.         rope.enablePhysics = true;
    8.         rope.rigidbody.isKinematic = true;
    9.         rope.jointSpacing = 0.05f;
    10.        
    11.         rope.LowAngXLimit = 2;
    12.         rope.AngYLimit = 0;
    13.         rope.HighAngXLimit = 0;
    14.         rope.S1LDamper = 0;
    15.         rope.S1LBounce = 0;
    16.         rope.S1LSpring = 0;
    17.        
    18.         rope.AngZLimit = 0;
    19.         rope.LTLDamper = 0;
    20.         rope.LTLBounce = 0;
    21.         rope.LTLSpring = 0;
    22.        
    23.         rope.AttachObject(castingPoint, 0, RopeAttachmentJointType.Hinge, true);
    24.        
    25.         QuickRope2Line line = rope.GetComponent<QuickRope2Line>();
    26.         LineRenderer lineRenderer = line.GetComponent<LineRenderer>();
    27.         lineRenderer.SetWidth(0.005f, 0.005f);
    28.        
    29.         rope.ApplyRopeSettings();
    30.     }
    I really have no idea what the values do but they seem to work best w/ these. Would it be possible to get a decent explanation as to what each setting does?

    With that said, I am still getting a runtime exception of:

    Code (csharp):
    1. NpScene::createJoint: desc.isValid() fails!
    2. UnityEngine.Joint:set_connectedBody(Rigidbody)
    3. QuickRope2:AttachObject(GameObject, Int32, RopeAttachmentJointType, Vector3, Boolean) (at Assets/Assets/Imported/QuickRopes 2/CoreScripts/QuickRope2.cs:900)
    4. QuickRope2:AttachObject(GameObject, Int32, RopeAttachmentJointType, Boolean) (at Assets/Assets/Imported/QuickRopes 2/CoreScripts/QuickRope2.cs:908)
    5. CastingController:createRope() (at Assets/src/Controllers/CastingController.cs:167)
    6. CastingController:Start() (at Assets/src/Controllers/CastingController.cs:28)
    7.  
    Not sure exactly what to do to fix it.

    Thanks!

    PAR
     
  4. par-002

    par-002

    Joined:
    Jul 4, 2012
    Posts:
    52
    Is this still being maintained?

    PAR
     
  5. Espion

    Espion

    Joined:
    Sep 10, 2013
    Posts:
    10
    Hi,

    Firstly, a big thanks for making this asset, it's very cool.

    Secondly, I'm wondering if there's a way to make the end point of a rope object retract the rope as the start point extends it (using the controller feature) and vice versa? I'd like to create a pulley, essentially, so as the player moves the chain in one direction the excess links are removed as new ones are added. If not, would I be allowed to modify the scripts involved so that I can do this myself?

    Thanks again,

    Ben
     
  6. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    @Espion No there is unfortunately no way of making the end point of the rope retract. Sorry about that :S.

    @par.002 QuickRopes is 'sort of' being maintained. Unfortunately due to lack of time on my part I had to cut down the price and limit support/updates on it. I have some plans for QuickRopes in the near future though and I have been passing around a newer updated version of QuickRopes which has been in the works off and on for some time now. About your error, I will check it out tomorrow and see what I can find. In the mean time, could you tell me what version of Unity you are using? Thanks!

    @Everyone The same goes for QuickRopes as went for 2DVLS. I managed to burn myself out on these projects due to lack of time and overworking myself at my day job. I am feeling like its time to bust butt and get these assets back at par to what you guys are expecting and wanting. I have decided to start moving towards doing this full-time so I can provide those things for you. You should start to see improved code and more frequent updates from now on!

    Thanks guys,
    Jake
     
  7. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Hey if anyone is having issues with Errors please contact me via email with your order number first before posting negative reviews on the Asset Store. I will be sure and take care of you there while I am working on the next update to QuickRopes (Which will fix the errors)

    Thanks!
    Jake
     
  8. matsmith

    matsmith

    Joined:
    Mar 3, 2014
    Posts:
    3
    Hi Jake,

    I've just bought quickropes, really impressed, great job! Just a quick question though, I'm using it with an oculus rift and the rope only renders in the right camera. Any thoughts about how to fix this?

    Cheers,
    Matt
     
  9. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Thanks glad you like it.

    Unfortunately I am not really sure how the Oculus Rift works as far as how it renders so I do not know how much help I can be with this issue. Maybe someone on the community will have a better idea?

    I will try and get my hands on the Oculus prefabs and try it out. But if anyone has any idea about this let us know!

    Jake
     
  10. matsmith

    matsmith

    Joined:
    Mar 3, 2014
    Posts:
    3
    Thanks for looking into this for me. You can get OculusUnityIntegration.unitypackage from their site, I'm using the OVRPlayerController prefab in my scene and it's CameraLeft that won't render the rope.

    Cheers,
    Matt
     
  11. epic1legend

    epic1legend

    Joined:
    Feb 21, 2014
    Posts:
    1
    I am very new to unity. (taking a school class on it) I am making a 2D game, I have a character with basic movements and rigidbody. I am wodering how to get the character to attach to the rope if he touches it and a specific button is being held down. I tryed using the AttachOnCollision script but couldn't get it to work. Please help. Thank you.
     
  12. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    @matSmith: Any luck with the issue you were having? I have a dev account for the Oculus but I still have not gotten the chance to download that controller prefab so sorry about that but I should have an opportunity to do it tomorrow and see what I can come up with for you. I am also curious about whether you are you using the raise/lower feature of the rope? I would like to check if the beta version of QuickRopes works on Oculus rift and if it does I might just send you that copy of that since its a bit more stable.

    @epic1legend: I am not really sure what your setup is like so I cannot really give you a really good answer. Make sure the script that contains the "OnCollision" method is attached to your player. And have the code attach your player to the collider via a 'fixed joint' during the OnCollision call. Obviously you will need to keep track of the states and joints you create so if you want to move your character up and down or release the rope you can just null out the joint. If you could give me more details or have any more questions let me know. You can also contact me via email at reveriejake87@gmail.com

    Jake
     
  13. CaptCruncher

    CaptCruncher

    Joined:
    Jun 16, 2013
    Posts:
    3
    Hey Jake, I'm loving how fluid your ropes are, but I have a question. I attach my rope to a moving object and when that object comes to a stop, the rope swing around everywhere violently, taking a good while to stop.

    I've fiddled with swing and twist limits to no avail. Do you know a way i can attach your rope to an object and have it move as minimally as possible, only barely swaying or twisting?

    EDIT: NVM I figured it out. :)
     
    Last edited: Mar 7, 2014
  14. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    @CaptCruncher Glad you figured it out! Sorry I didnt catch your question in time.

    @matSmith It seems to work for me with the "OVRPlayerController" prefab...

    IMAGE
    $Oculus.PNG


    Contact me via email. Maybe it has something to do with the Rope version. I have a new one.

    Jake
     
  15. matsmith

    matsmith

    Joined:
    Mar 3, 2014
    Posts:
    3
    Hi Jake,

    Yes I do use the raise/lower feature, still no luck gettting it to display in both screens though. Will mail you now re the beta version.

    Cheers,
    Matt
     
  16. Nasaug

    Nasaug

    Joined:
    Oct 7, 2013
    Posts:
    2
    Hi Jake,

    First of all, thanks for an awesome script. I am currently using it for a 2.5 platformer, where one of the characters have the ability to create ropes to swing from. Creation of the ropes and swinging works, but I have a problem when I "let go" of the rope. I want the rope to disappear entirely (basically be destroyed), but when I try Unity's Destroy(), there is still a ghost version of the rope attached to the player and the object it was swinging from, which causes strange movement behaviour.

    My question is: How do I destroy a rope effectively? I have tried detaching objects, destroying joints individually and removing parts of the rope one at a time, but I have had no success.

    I'm using the following code (a modified version of Zaddo's example from earlier) to create the rope:
    Code (csharp):
    1.         _currentRope = QuickRope2.Create(
    2.             swingBox.transform.position,
    3.             this.transform.position,
    4.             BasicRopeTypes.Mesh);
    5.         _currentRope.enablePhysics = true;
    6.         _currentRope.useGravity = true;
    7.         _currentRope.constraint = RopeConstraint.X_Y;
    8.         _currentRope.mass = 3;
    9.         _currentRope.GetComponent<QuickRope2Mesh>().curve = new AnimationCurve(new Keyframe(0, .05f), new Keyframe(1, .05f));
    10.         _currentRope.ApplyRopeSettings();
    11.         _currentRope.ropeEnd = swingBox;
    12.         _currentRope.AttachObject(this.gameObject, _currentRope.Joints.Count - 1, true);
    13.         _currentRope.GetComponent<QuickRope2Mesh>().UpdateMesh();
    14.  
    15.         // Attach to objects with a joint
    16.         FixedJoint jointStart = (FixedJoint)_currentRope.gameObject.AddComponent(typeof(FixedJoint));
    17.         jointStart.connectedBody = swingBox.rigidbody;
    18.         FixedJoint jointEnd = (FixedJoint)_currentRope.ropeEnd.gameObject.AddComponent(typeof(FixedJoint));
    19.         jointEnd.connectedBody = this.transform.gameObject.rigidbody;
    - Jacob
     
  17. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,349
    Just bought the pack from the store, i loved the bridge setup which is what i mainly want it for. Is there a newer version that we could use ?

    I have also sent an email about some crashes mentioned in the asset store comments

    Can you also post the solution to the error in 4.3 ?

    What should we change in code for the following error ?

    "Cannot destroy GameObject while it is being activated or deactivated."

    EDIT1: I tried to make a check for activated before destroy, but that creates problems in the editor (if i change rope type, previous types remain in viewport)

    The pack is amazing BTW, pitty to be marked down for these errors. I have setup a perfect bridge in a few minutes :), very cool pack, i think i can live with the errors until they get fixed, i will integrate to my project now

    EDIT2: I read in previous posts that you can email the code that does not produce the errors, i have sent an email with my invoice, if you can send me the error free code. Thanks
     
    Last edited: Mar 22, 2014
  18. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Email sent.

    Jake
     
  19. Nasaug

    Nasaug

    Joined:
    Oct 7, 2013
    Posts:
    2
    So I figured out what my problem was. I never removed the FixedJoint that tied the box and the player together, so even though the rope was gone, the joint between those two was not. This was enough to fix it:
    Code (csharp):
    1. Destroy(_currentRope.ropeEnd.GetComponent<FixedJoint>());
    Makes me feel kinda silly that I did not think of this earlier.

    Once again, thanks for this amazing plugin, Jake!
     
  20. Assault

    Assault

    Joined:
    Aug 21, 2012
    Posts:
    60
    Any ideas when Quick ropes 3 would be out?
     
  21. lyh1091106900

    lyh1091106900

    Joined:
    Apr 17, 2014
    Posts:
    13
    I want to use quick rope2 but i have no idea about that ,Can you help ?
     
  22. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    @Assault: Nothing official still but it is very much in the works. I have still been working mostly on updating 2DVLS but I will continue on QuickRopes 3 as soon as that's done. Sorry for the late response. As usual, I don't seem to get notified of every response on here.

    @lyh1091106900: What do you need help with specifically? Contact me through my email reveriejake87@gmail.com with specific questions.

    Jake
     
  23. lyh1091106900

    lyh1091106900

    Joined:
    Apr 17, 2014
    Posts:
    13
    I attach arigibody to the rope ,but it fall down as nothing happen. can you help
     
  24. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,349
    I am really amazed with the system, it simply works wonders.

    I can setup detailed bridges, with side sticks etc easilly and they work great, i have added a collider to make it move as heroes go by too and the effect is really amazing

    Great product

    Did you define the link to the object in the system ? (Attach -> attach gameobject in rope inspector)
     
    Last edited: Apr 19, 2014
  25. lyh1091106900

    lyh1091106900

    Joined:
    Apr 17, 2014
    Posts:
    13
    I say the rigidbody fall down,I know it has gravity ,how can I use rope to tie rigidbody,
     
  26. lyh1091106900

    lyh1091106900

    Joined:
    Apr 17, 2014
    Posts:
    13
    $QQ??3.png $QQ??4.png
    why the rigidbody fall down. how can I use totie rigidbody.
     
  27. lyh1091106900

    lyh1091106900

    Joined:
    Apr 17, 2014
    Posts:
    13
    how to solve the problem "can not destroy gameobject whiling it's being activated or deactivate
     
  28. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,349
    Email for the latest version, i did and was provided with a version these errors do not happen

    The links to the object are defined in the inspector, you make a new attach node and define the type of attachment, and put the gameobject there

    Reload your scene to make it work if at first breaks
     
  29. lyh1091106900

    lyh1091106900

    Joined:
    Apr 17, 2014
    Posts:
    13
    can I have you e-mail ,I did it ,it works when the body is rifibody,but it failed when I add rigibody2D, I want to do a 2Dgame .what should I do ? becauce rigidbody can't add phsics2D component.
     
  30. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,349
    I cant say about 2D, i have only used it in 3D

    Also i am not the developer of the asset, just used it recently and know how it works (at least in 3D case)

    For the latest version email the developer
     
  31. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Quickropes does not work with 2D components. It was made before Unity introduced the 2D tools and I have not and probably will not add 2D to QuickRopes. If you will please send me an email I can give you the newest copy of QuickRopes along with some instructions on how to simulate a 2D rope with it.

    Again, my email is reveriejake87@gmail.com.

    Thanks for helping out Nasos

    Jake
     
  32. lyh1091106900

    lyh1091106900

    Joined:
    Apr 17, 2014
    Posts:
    13
    my e-mail address is lyh1091106900@gmail.com. I just want rope work in x-y space .like force .thank you for help.
     
  33. lyh1091106900

    lyh1091106900

    Joined:
    Apr 17, 2014
    Posts:
    13
    $QQ??10.png $QQ??11.png how can I change the position of the rope during the scene playing .I can't change the top orange point . is there any function in the scripe
     
  34. lyh1091106900

    lyh1091106900

    Joined:
    Apr 17, 2014
    Posts:
    13
    how can I add collider to the rope
     
  35. lyh1091106900

    lyh1091106900

    Joined:
    Apr 17, 2014
    Posts:
    13
    how can I change the joint[0]'s position of a rope ?
     
  36. lyh1091106900

    lyh1091106900

    Joined:
    Apr 17, 2014
    Posts:
    13
    $QQ15.png how can I use function in QuickRope2 class like ExtendRope(float);I always get error message “QuickRope2 doesn't contain definition for 'ExtendRope'.
     
  37. AntonQvarfordt

    AntonQvarfordt

    Joined:
    Mar 14, 2013
    Posts:
    27
    I'm trying to figure out how to do a "hoolahoop-rope", i.e. a rope thats circular and connected to itself. Having a hard time coming up with a way to do this, any ideas? Here is a reference picture of what I'm trying to achieve:



    Addendum: I tend to get quite a bit of jitter when the rope get strained at all, anyone else had this?

    Did a little video of it here:

     
    Last edited: Apr 24, 2014
  38. rodrigoteski

    rodrigoteski

    Joined:
    Jul 10, 2012
    Posts:
    6
    http://www.youtube.com/watch?v=vLui2XgHK4E

    I am a happy owner of your program, but I need to make a game where the player is a submarine which is stuck on the end of the rope and can only move according to the distance of the rope, which is attached at the other end at a fixed point as in the video above. How to do this?
     
  39. jeffries7

    jeffries7

    Joined:
    Jun 25, 2014
    Posts:
    59
    Hi Jake, got a copy of QuickRopes2 yesterday and i'm having some issues with scaling the ropes. It seems that the prefab rope is the only rope that allows scaling and this raises an issue as the the link spacing needs to be dropped down to 0.1 which grinds the IDE down to a halt.

    I need the ropes to attach to a humanoid which requires the ropes to be scaled to 0.1.....any ideas?
     
  40. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Again, this forum is very on/off about sending me updates when you guys post on here so I apologize for not seeing some of your posts on the day of. If you send me an email to reveriejake87@gmail.com and I do not reply please try sending it once more. I typically try to respond to emails within 24 hours of receiving them. If it takes longer please shoot me another email! Don't feel bad for bugging me, I am here to help if I can! Send 500 emails if you need to get my attention ;). But by all means do not expect quick response times on this forum due to how I am notified of your comments.


    @lyh
    ExtendRope is a private function but you can change it in the code to suite your needs. Be aware that if you change it though your rope might act strange. Make sure that all movements going into that function are smooth and do not go from say 0 to 1 unit in a single update.

    Are you referring to how to change Joint[0] within script or via the editor? It has been awhile since I have done anything with ropes but I am not sure if the joint list is public or not in this version. Again if you want it public and it is not then you will have to edit that to make it possible. Otherwise I think the 'ControlPoints' array is public and you can adjust it at index 1 to move the end point. Index 0 should also be adjusted to be in a straight line with index 0, 1, and 2.

    @Toffel Out of the box this version does not support loops. At the time I tried making it possible to allow people to make things like treads but I kept running into a few issues. I am a bit more experienced now with C# and Unity physics but I still have issues with getting the time to update these assets. I have also got 2DVLS that needs to be updated! (Stress much!)

    Jitter did seem to be a problem. I believe that was due to the way I was connecting my joints together. In the updated version I was working on this was solved. But I still have a hard time finding time to wrap up the update.

    @rodrigoteski I honestly can't remember how the API works. As I have said above its been awhile since I played around with QuickRopes myself because of my current schedule but your best bet would be to use the 'attachments' tab.

    Shoot me an email if you cant get that figured out...


    @jefferies7 Yeah there is an issue with scale in this version because (for some dumb reason) I made all of the control points use global positions instead of local to the rope object. So if you try to scale it in X, Y, or Z you will run into some issues. As for the joint count, it will lag out Unity depending on how many joints your using. If you have a long rope and set the scale to be 0.1 then you will probably have issues. Is there anyway you can fake this with less joints?


    Jake

    Again, let me know if you guys are still having issues or if I have misunderstood you in anyway. And as stated above the best way to get a hold of me is via GMail. Those are sent directly to my cellphone.
     
  41. Afassolas

    Afassolas

    Joined:
    Apr 10, 2013
    Posts:
    78
    Hi Just bought QuickRopes 2 and there seems to be only one youtube tutorial about it :( and no code examples on using it. I am interested in some pointers on how to make a player jump on a rope and then jump off of it. Can't seem to find ANYTHING on what i consider the biggest usage of such a system. Please reply here or contact me at antonis.fassolas@gmail.com
     
  42. MalboM

    MalboM

    Joined:
    Apr 29, 2013
    Posts:
    66
    Hello! Just bought this awesome plugin! I would like to know how to create a swing (with two ropes attached to the same gameobject

    thank you very much!
     
  43. MalboM

    MalboM

    Joined:
    Apr 29, 2013
    Posts:
    66
    I was able to do that in the end, but I have a new problem. I have attached a cube to that rope, and moving the cube in the scene view causes a weird movement on the cord. Do you know that's the problem?

    thanks
     
  44. hitking100

    hitking100

    Joined:
    Oct 4, 2011
    Posts:
    75
    Wow, bought this nearly 2 years ago and just started playing with it. I'm having a very weird problem though (bear in mind that i'm NOT a programmer and only use playmaker). I created a rope between 2 posts with the intention of having my character just make it shake upon colliding with it. When i hit play it works fine when i move my character with the mouse in the scene view, but when i try to actually move it in the game view with the cursor keys, it stops like it just hit an invisible wall ???
     
  45. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Hey guys.. Apologies to those of you who own a copy of QuickRopes and are waiting for updates and bug fixes. Unfortunately my VLS2D 4.0 asset took control of my life over the past year or so and once Unity 4.2 was release bugs started popping up. Since its sales were about 4x larger than Quick-Ropes (resulting in more daily emails), I was forced to focus on that asset. But I do have plans to continue with Quick-Ropes starting at the end of this month.

    I tend to be a bit irregular on the forums so If you want more updates please follow PicoGames on Facebook!
    Or visit PicoGames.com

    I look forward to continuing!

    @hitking100 - This is a strange issue? It works in the scene view but not in-game... I wonder if it has something to do with how the rope end-point is connected to your character. Is it connected just by parenting or are you using joints? You should always connect your rope to other rigidbodies via a Joint.
     
  46. hitking100

    hitking100

    Joined:
    Oct 4, 2011
    Posts:
    75
    Well, i see it working in the game view if i use the mouse to drag my character against the ropes, but he won't do it once i start using the cursor keys. I used fixed joints for all ropes.
     
  47. hitking100

    hitking100

    Joined:
    Oct 4, 2011
    Posts:
    75
  48. hitking100

    hitking100

    Joined:
    Oct 4, 2011
    Posts:
    75
    And it works when i drag it in the scene view.

    boxing2.jpg
     
  49. hitking100

    hitking100

    Joined:
    Oct 4, 2011
    Posts:
    75
    Problem solved (added force script)
     
  50. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455