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

    edudsfdsgsd

    Joined:
    Oct 24, 2013
    Posts:
    3
    Is there any way to get the tension/force applied on each node? Or at least on the control points?

    I was expecting something like:

    Vector3 Rope.RopeNodes[0].getTension()
     
  2. UGTools

    UGTools

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

    There is no direct way to get tension values of joints in Unity. It is a limitation of PhysX, the physics system that Unity uses. This API doesn't provide a way to get them I'm afraid.

    You can at least get a slight idea comparing the rope length to the actual distance between the start and end points. If the second value is higher, then there is some kind of tension as the joints are stretched a little bit over their limits.
    Also you could compare the actual distance between 2 links and the link length (segment length / num links). This can also give you an approximate idea.
     
  3. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I have a mesh suspension bridge with no bones/animation can rope editor still work on it as is or what would be required?
    I tried looking in your documentation for this kind of senario but I didn't find anything to apply to a simple mesh but your marketing you say your tool can be applied to any mesh. Could you help me out here? thank you.
     
  4. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    How would I make a Grapple Hook with thus plugin? I have honestly tried forever thanks in advance!
     
  5. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Some information may be found here where some users ask how to use it with harpoons or to make a spiderman-like game.
    http://forum.unity3d.com/threads/ul...pe-physics-for-unity3d-released.169995/page-2

    There are no specific scripts included with grappling hook logic, maybe this is something I will add in the future as it is requested quite frequently
    Anyway, it should not be too hard to do:

    -Have rope instanced at runtime or at editor time. Between gameobjects A and B (both rigidbodies, both kinematic)
    -End A remains attached to the player, end B is shot to the air and turned into dynamic rigidbody.

    Code (csharp):
    1.  
    2. B.rigidbody.iskinematic = false;
    3. B.rigidbody.velocity = shotdirection * speed;
    4.  
    -Each frame the rope gets elongated depending on distance between A and B plus a little margin:

    (pseudocode)

    Code (csharp):
    1.  
    2. if(rope.ropeLength < (Distance(A, B) + Margin))
    3. rope.ExtendRope((Distance(A, B) + Margin) - rope.ropeLength);
    4.  
    -If B detects hit, then remain attached there (make kinematic again)

    Code (csharp):
    1.  
    2. B.rigidbody.isKinematic = true;
    3.  
    -Rope can now be elongated or shortened at will.

    Hope that this helps
     
  6. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Apologies if this has been asked before, but 8 pages is quite a few to read through at once.

    Anyway, is it possible to create a rope completely procedurally at runtime? For example, saving a basic length of rope as a prefab, then instancing it is and defining its properties (start point, end point, tension, etc.) via script?
     
  7. UGTools

    UGTools

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

    Yes, you can even completely create it without prefabs. Just add a UltimateRope component, assign the parameters via script and call the Regenerate() method :)
     
  8. TerraCo

    TerraCo

    Joined:
    Jun 8, 2013
    Posts:
    26
    Got a problem that I think is to do more with Unity itself.

    We have 4 cars attached to a single rope each. Each rope is attached to a rigid body with disconnecting parts. When we pull the cars away from each other, the joints freak out and start flailing wildly trying to go back to their original position.

    First we tried creating our own system which worked for the most part, but we had to make the rope too heavy for it to feel and play properly. I bought your package last night to try fix this, but it seems I'm still struggling to have a few heavy objects (Rigid body mass = 1300 per object) connected without the flailing behaviour.

    Increasing the physics time step helped a lot, but I still can't seem to have ropes that snap tight and prevent further movement.

    Suggestions?
     
  9. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Great! Thanks for the quick reply.
     
  10. DeepMotionPhysics

    DeepMotionPhysics

    Joined:
    Jul 31, 2014
    Posts:
    243
    Soft joint is an intrinsic limitation of PhysX engine. Reference the following thread for more discussion on the problem.

    http://forum.unity3d.com/threads/ap...for-robust-joints-and-powerful-motors.259889/

    -kc

     
    UGTools likes this.
  11. TerraCo

    TerraCo

    Joined:
    Jun 8, 2013
    Posts:
    26
  12. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    I would definitely consider licensing the APE if it improves the rope editor :)
     
  13. rwgames68

    rwgames68

    Joined:
    Jul 2, 2012
    Posts:
    7
    Hello, I'm having a problem with my lantern jumping. I have a chain attached to an empty gameobject as a hanging point from light post with a lantern as the end point. When I run the game the lantern is swinging but when it settles down and comes to a rest it and the chain jumps wildly and settles back down again.
    The lantern and rope has gravity on and IsKinematic not checked. When this is checked on the rope only then it works fine but it won't be affected by other physics and windzone.

     

    Attached Files:

    Last edited: Mar 3, 2015
  14. UGTools

    UGTools

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

    Does the lantern have a collider? Check if disabling the lantern collider fixes it. Maybe the rope itself is intersecting the lantern and makes it jump. It looks like something screwing up the physics :)
     
  15. TimBorquez

    TimBorquez

    Joined:
    Mar 18, 2013
    Posts:
    81
    will this be updated for Unity 5? or did nothing break with the new version
     
  16. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Good news! we submitted our full Unity 5 compatible version yesterday, it should be available really soon!
    Check our twitter/facebook accounts for updates :)
     
    OnePxl likes this.
  17. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    111
    Is there a temp solution for the 2 errors in V5?
    "Assets/Ultimate Game Tools/RopeEditor/Scripts/UltimateRope.cs(3308,28): error CS0619: `UnityEngine.SoftJointLimit.spring' is obsolete: `spring has been moved to SoftJointLimitSpring class in Unity 5'"
    Assets/Ultimate Game Tools/RopeEditor/Scripts/UltimateRope.cs(3309,28): error CS0619: `UnityEngine.SoftJointLimit.damper' is obsolete: `damper has been moved to SoftJointLimitSpring class in Unity 5'
    I am afraid I don't have the time to wait for the update to arrive in the Store.
     
  18. TimBorquez

    TimBorquez

    Joined:
    Mar 18, 2013
    Posts:
    81
    very nice, thank you :)
     
  19. UGTools

    UGTools

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

    If you don't have the time, just remove those two lines momentarily :)

     
  20. rwgames68

    rwgames68

    Joined:
    Jul 2, 2012
    Posts:
    7
    Yes it has a collider but disabling didn't fix it. After comparing your 'Lamp sample scene' with mine for the second time I see that your rope object does not have a rigidbody attached to it and mine does so removing that seems to have fixed the problem. It was automatically put there from your script when I originally placed in my scene.
     
  21. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    I must be missing something right in front of my face, but how do you add the end point on a rope via script? I can set the start just fine, but cannot for the life of me figure out how to access the segment section and add a new segment at runtime via C#.

    Any tips?
     
  22. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Also, I get MissingReferenceException errors whenever I change the length of a segment via the editor while the game is running. Is that normal?

    MissingReferenceException: The object of type 'SkinnedMeshRenderer' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    UnityEditor.Editor.IsEnabled ()
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty)
    UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors)
    UnityEditor.InspectorWindow.OnGUI ()
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)​
     
  23. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Each rope segment is a rope.RopeNodes entry. rope.RopeNodes is a List<UltimateRope.RopeNode>
    In RopeNode you need to set the goNode var.
     
  24. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    I just checked and have the same error, luckily it doesn't break anything. I'll fix it ASAP :)
     
  25. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Cool, thanks for the help!

    Another question: does anyone else get ropes that flicker white, especially when they're moving? Once the rope settles down it stays on the rope texture, but for a while after it's spawned it has a bad flickering effect.
     
  26. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Curious if this was supposed to be fixed in the version released today; I'm still getting the error after updating.

    It doesn't hurt anything if you're messing with stuff outside of play mode, but if you're playing in the editor and have "Error Pause" selected, it is quite disruptive. And I don't want to uncheck that option, as it's useful for many other scripting issues.
     
  27. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    No, it was submitted the week before
    I agree with the play mode being important, as one of the main features is the "persist after playmode" option, where you can save the rope state after running playmode physics.

     
  28. ElectroMantis

    ElectroMantis

    Joined:
    Sep 15, 2013
    Posts:
    78
    Hey, I've been trying to put together a grappling gun. I have tried implementing the pseudocode From here, but I'm having a lot of trouble so far, but I have something almost working now.

    Here's the code I'm using:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class Gun : MonoBehaviour {
    5.  
    6.     public GameObject StartPos;
    7.     public GameObject Hook;
    8.     public UltimateRope rope;
    9.     public float speed = 1.5f;
    10.     public float Margin = 0.1f;
    11.     public float m_fRopeExtension;
    12.     public float startDistance;
    13.     public float maxSpeed = 0.4;
    14.     bool fired;
    15.     public float inc;
    16.     // Use this for initialization
    17.     void Start () {
    18.         startDistance = Vector3.Distance(StartPos.transform.position, Hook.transform.position);
    19.     }
    20.    
    21.     // Update is called once per frame
    22.     void Update () {
    23.         if (Input.GetKey(KeyCode.Space) && fired == false) // if space is pressed, and we have not fired yet
    24.         {
    25.             if(Vector3.Distance(StartPos.transform.position, Hook.transform.position) < rope.ExtensibleLength) // double check if we have not exceeded our distance
    26.             Fire();
    27.            
    28.            
    29.         }
    30. // get the distance of the gun and the hook and add margin.
    31.         m_fRopeExtension = Vector3.Distance(StartPos.transform.position, Hook.transform.position) + Margin;
    32.  // Clamp the value to the extensible length
    33.         m_fRopeExtension = Mathf.Clamp(m_fRopeExtension, 0.0f, rope.ExtensibleLength);
    34. // if the current length of the rope is smaller then the distance + margin
    35.         if ((rope.m_fCurrentExtension + startDistance) < m_fRopeExtension)
    36.  
    37.             rope.ExtendRope(UltimateRope.ERopeExtensionMode.LinearExtensionIncrement, m_fRopeExtension - (rope.m_fCurrentExtension + startDistance));
    38.             }
    39.  
    40.     void Fire()
    41.     {
    42.  
    43.         inc += speed * Time.deltaTime;
    44.         inc = Mathf.Clamp(inc, 0.0f, maxSpeed);
    45.        
    46.         Hook.transform.transform.Translate(transform.forward * inc, Space.Self);
    47.        
    48.         if (Vector3.Distance(StartPos.transform.position, Hook.transform.position) >= rope.ExtensibleLength)
    49.         {
    50.             inc = 0;
    51.             rope.LinkJointAngularXLimit = 30;
    52.             rope.LinkJointAngularYLimit = 30;
    53.             rope.LinkJointAngularZLimit = 30;
    54.             Hook.GetComponent<Rigidbody>().isKinematic = false;
    55.            
    56.             fired = true;
    57.             Debug.Log("End Of the Line!");
    58.         }
    59.        
    60.         // I'm also using translate instead of velocity. Couldn't get velocity to work well.
    61.         //Hook.GetComponent<Rigidbody>().velocity = Hook.transform.forward * speed;
    62.     }
    63. }
    64.  
    Initially I had the angular limits set to default values, and the rope would spaz out when I extended the rope.

    I changed the angular limit for the link joints to 0 on all axes, and that made my rope more stable, that's well and good.
    But I want to change the limit back to 30 once the rope has reached it's length. How would I do this? I use LinkJointAngularXLimit and so on, but it doesn't seem to affect the joints.

    Now when I used velocity for my hook movement, my speed was really slow compared to what my velocity input was (usually at least 100). So then I switched to transform.translate for my hook movement, and that worked a little better. It does act a little funny - the higher I aim the gun, the more hook will progressively curve backwards.
    Is this the best way to do it? It seems like rigidbody.velocity or Addforce would be a better option if I could get it working. The translate way also seems to glitch the rope when I use a higher speed.

    Do you have any advice regarding this?

    (Here's a webplayer of what I have so far, hold space to fire.)

    By the way, this is a great asset. My only gripe with it is the fact that it's really finicky to set up (especially getting the correct distance between the rope points so it doesn't spaz on startup). Some more details in the documentation would also be nice to have ;).
     
  29. UGTools

    UGTools

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

    If you want to change the parameters in realtime, you can use something like this:

    Code (csharp):
    1.  
    2. void SetAngularLimits(UltimateRope rope, float fLimitX, float fLimitY, float fLimitZ)
    3. {
    4.     for (int nNode = 0; nNode < rope.RopeNodes.Count; nNode++)
    5.     {
    6.       UltimateRope.RopeNode node = RopeNodes[nNode];
    7.  
    8.       for (int nJoint = 0; nJoint < node.linkJoints.Length; nJoint++)
    9.       {
    10.         if (node.linkJoints[nJoint] != null)
    11.         {
    12.           ConfigurableJoint joint = node.linkJoints[nJoint];
    13.           SoftJointLimit jointLimit = joint.lowAngularXLimit;
    14.           jointLimit.limit = -fLimitX;
    15.           joint.lowAngularXLimit = jointLimit;
    16.  
    17.           jointLimit.limit = fLimitX;
    18.           joint.highAngularXLimit = jointLimit;
    19.  
    20.           jointLimit.limit = fLimitY;
    21.           joint.angularYLimit = jointLimit;
    22.  
    23.           jointLimit.limit = fLimitZ;
    24.           joint.angularZLimit = jointLimit;
    25.         }
    26.       }
    27.     }
    28.   }
    29.  
    Your rope looks really cool, tell me if you could fix it! :)
     
  30. detournment_19

    detournment_19

    Joined:
    Jan 20, 2015
    Posts:
    22
    Very cool work! I'm wondering how the rope would work in a jumprope type of use. Attaching the 2 ends of a rope to objects that circle around and rotate to get the rope swinging as jumprope does, with various speed changes. Would the physics be an issue?
     
  31. jarredbevis

    jarredbevis

    Joined:
    Mar 30, 2015
    Posts:
    2
    Hi There,
    Great tool!
    I get this a lot though? Default scene, unity 5, rope between 2 empty game objects.
    Thanks
    Jarred
     

    Attached Files:

    MojopinStudios likes this.
  32. Jiraiyah

    Jiraiyah

    Joined:
    Mar 4, 2013
    Posts:
    175
    Hi
    I have a question. lets say that i have a rope hanging from roof of the level and i want my character to climb it using mecanim animation, how should i approach this so that the part of the rope bellow the character swings but the top portion stay rigid?
     
  33. MojopinStudios

    MojopinStudios

    Joined:
    Jan 9, 2013
    Posts:
    21
    I want to add my name to people who get this a lot. I am just trying to run a rope from one point to another, having it taut, but reacting to a capsule collider and stretching a tiny bit. But I am getting like Jarred above. Any ideas why and how to fix it?
     
  34. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    @UGTools Hello, I just updated to the latest Asset Store version (compatible with Unity 5) but during playmode when I activate a game object containing items with Ultimate Rope components I get A LOT of errors like this one:

    Code (CSharp):
    1. Destroying components immediately is not permitted during physics trigger/contact, animation event callbacks or OnValidate. You must use Destroy instead.
    2. UnityEngine.Object:DestroyImmediate(Object)
    3. UltimateRope:SetupRopeLinks() (at Assets/Ultimate Game Tools/RopeEditor/Scripts/UltimateRope.cs:1987)
    4. UltimateRope:Awake() (at Assets/Ultimate Game Tools/RopeEditor/Scripts/UltimateRope.cs:672)
    5. UnityEngine.GameObject:SetActive(Boolean)
    6. [...]
    Any idea what would cause such a stream of errors?
     
  35. ElectroMantis

    ElectroMantis

    Joined:
    Sep 15, 2013
    Posts:
    78
    Thanks for that, but changing those parameters didn't have the desired effect.
    In fact, moving the hook and extending the rope in realtime has given me too many problems with the physics trying to catch up.

    Instead, I decided to move the hook in one increment directly. So, if my raycast hits a wall, the hooks position is set to the raycasthit.point. Otherwise, the position is set to an empty and the hook's iskinematic value set to false.

    My first try at getting the rope to work this way, I simply set the fLength to the distance between the gun and the target, and then regenerated the rope. This did kind of work, but I didn't like regenerating every time I needed the rope to be longer, the rope would be stiff for a moment before the physics set in and it looked weird. Plus I need the hook to retract when I'm done with it, so that leaves me with the ExtendRope method.

    Here is the result:



    At the end of the gif you can see that at least half of the extension is stuck together and is stiff like a pole.

    This is what happens, when the mouse is clicked, I extend the rope to the value of the distance, and then assign the hook's position to the selected gameobject's position. The above gif image has collider skip set to 10, which isn't ideal for a realistic simulation, If I set it any more than that, the colliders in the "stiff" part of that rope intersect with each other and ricochet all over the place.

    I'm using LinearExtentionIncrement for the extension mode, perhaps it shouldn't be used for large increments?.

    I really want to get this to work, but I'm starting to wonder if really fast rope extending will even be achievable. I could fire the hook super slowly and update the extension every frame, but that wouldn't look too believable I guess. Any suggestions would be much appreciated.

    In the end was hoping to be able to fire the hook at a moving target and have it sort of drag around the player.

    I think you mentioned above that you were considering adding grappling hook logic to the ultimate rope project. I think that would be an extremely useful feature! (for me at least lol)
     
  36. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    SecondBake, if IsExtensible is set to true, you should be able to extend the rope up to its segment length plus the Extensible Length value. If you use the extension system, you don't need to regenerate the rope on every extension. The extension system naturally adds the length.

    I have a grappling hook working by attaching one end of the rope to the player and another end to the grappling hook object, and then moving the grappling hook toward where I want it to land. Then, every frame (i.e. OnUpdate) I get the distance between the start of the rope and the grappling hook, to see how long the rope should be. I then add its length and its current extension amount. If those are shorter than the distance between the player and the grappling hook, I extend the rope by the difference. I do that each frame, and it works fine.

    My rope just has one segment, so to find its total length I add the Length of Segment[0] to the rope's m_fCurrentExtension property, which lets you see how much the extension system has added. I also add a little extra length, since the rope is moving and will be a little longer by the next frame. I've found that it's generally a pretty good idea with this system to add a little length to any rope just to make sure it doesn't get stretch to the point where it freaks out.

    So if the rope is supposed to be 10.22 units long, and its Segment[0].Length is 8 and its m_fCurrentExtension is 2.09, that means it is .13 units short. So I'd extend it by .13 units. Plus a little fudge factor to be safe (I calculate how far the grapple is moving per frame and add that much extra, to make sure it won't get into trouble by the next time I check).

    But in short, just move your grappling hook toward the target, and on each frame make sure the rope is long enough to stretch, and make sure that the Extensible Length value is high enough; the system will not extend a rope beyond that limit.

    I'm running into a few other issues with the system, but they're known bugs the dev is working on (though he's gone quiet for 3 weeks now, which is concerning).
     
  37. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    That happens when the rope is too short for the distance it's supposed to be. How far apart are those poles? If they're more than 5 units apart (which is the length of your rope), it'll freak out like that.

    Also, try higher Link Joint Spring and Link Joint Max Force values. 10, 50, 100, 1,000, or even higher.

    Whether it's due to this system or Unity's physics, ropes are really finicky. It takes a lot of trial and error to get them working, but those two values are very, very important.
     
  38. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    @UGTools is this asset supported anymore? This Monday will be four weeks without any replies to email or this forum thread.
     
  39. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hey OneThree!

    Wow! I wasn't receiving alerts for this thread anymore, somebody noticed me through e-mail. Of course it is supported! :)
    I have been on the forums answering all the alerts on my other threads. Thanks for taking care of some of the issues!
     
  40. UGTools

    UGTools

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

    Do you stretch it beyond the rope length limit? Unity's physics system doesn't support stretching. When this happens all links go nuts until the stretching disappears.

     
  41. UGTools

    UGTools

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

    Yes, something has changed in Unity 5 that didn't happen in Unity 3/4. I'll fix it and send an updated version to the store ASAP!
    I noticed there is another similar warning that shows on the console a lot. Harmless, but annoying.

     
  42. UGTools

    UGTools

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

    I probably would set all rope rigidbodies above the character with kinematic = true and set them as kinematic = false when the character climbs above them.

     
  43. Falling Bear

    Falling Bear

    Joined:
    Apr 27, 2015
    Posts:
    3
    Hi UGTools,

    I have a problem, I have a standard chain, the same one that is included in sample scene 04 - Breakable ropes, with break force set to maximum ( Infinity ). When I select start of rope and start moving with it quicky, the rope starts to tear. Example in following video. version 1.12

     
  44. UGTools

    UGTools

    Joined:
    Oct 10, 2012
    Posts:
    738
    Hi Falling Bear,

    Try increasing both the Link Joint Spring and Link Max Force values. How much are they in that video?

     
  45. RifS

    RifS

    Joined:
    Nov 27, 2013
    Posts:
    33
    Hi UGTools,
    I'm in the process making a grappling hook/harpoon as well, but it seems the rope can't update the joints fast enough when the "harpoon" is moving relatively fast.
    In my case, the harpoon Rigidbody (the sphere) is moving with velocity.magnitude ~= 30)

    Any suggestion?

    Here's the rope setup
     
  46. UGTools

    UGTools

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

    How exactly are you simulating the grappling hook?
    I can't see it in your capture, are you attaching the rope end to something and moving that at magnitude 30?
     
  47. RifS

    RifS

    Joined:
    Nov 27, 2013
    Posts:
    33
    In that animated gif, I made the "RopeStart" as the child of the sphere (the harpoon) GameObject. And the "RopeEnd" as the child of a "Nozzle" GameObject.
    "Nozzle" GameObject is an empty GameObject parented to the cube with specific localPosition with respect to the parent.
    The "Sphere" is launched, I set its body.velocity to shootingDirection.normalized * 30f

    I tried directly link "Nozzle" and "Sphere" GameObjects without intermediary "RopeStart" and "RopeEnd" GameObject, but it doesn't seem to be any help. Swapping the "Nozzle" and "Sphere" as the "RopeEnd" and "RopeStart" doesn't seem to change that much either. I still get see some instability when the sphere is launched.

    Also I have another question :
    Is there a way to change the Node link orientation when it pops from the RopeStart?
    It seems to me that the local rotation of the links are already pre-determined when the rope is made. I can't grasp my mind why the default local rotation of the links is defaulted around (63~70, 270, 0)
     
    Last edited: May 5, 2015
  48. UGTools

    UGTools

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

    Could you send me an example scene where I can see and finetune the grappling behaviour? Maybe I can help you set it up.
    Regarding your other question, I will take a look at it, never noticed that :)
     
  49. RifS

    RifS

    Joined:
    Nov 27, 2013
    Posts:
    33
    Oh... I think I know when the node links setup their own localRotation. When I dragged the rope end GameObject to the inspector window, the node link values get updated. I got crazy behavior because I move the rope end GameObject without updating them (dragging them again to UltimateRope component).
    Hmm... considering that, wouldn't it be hard for me to use it in real case where the gun's nozzle can be repositioned anywhere before the harpoon is shot. Is there a way to update the rope start/ rope end setup before the rope is generated?

    I've re-done my simple harpoon example here, since there were lots of unnecessary files included in package when I tried to export them from my current project.

    There's 1 more problem for my grappling hook. That is, how should I calculate the proper rope length if the rope doesn't form a straight line between the nozzle and the hook target.

    Thanks UGTools!
     
    Last edited: May 6, 2015
  50. Falling Bear

    Falling Bear

    Joined:
    Apr 27, 2015
    Posts:
    3
    Hi UGTools,

    that seems to be only solution, but the chain is super stiff then. Is there an another workaround. The values int he video are 1 and 1, when I rise them to 10 and 10 it does not break, but the chain does not look like chain anymore.