Make a rope with Joints

Im trying to make a rope with configurable joints but failed to change the limit parameters of the joints in script, i mean the following code returns error because it’s read only

_joint.linearLimit.limit = 2f;

Besides that i see no other way to make a rope for a grapling hook

to change the limits you can:

SoftJointLimit newLimit = new SoftJointLimit();
newLimit.limit = 2f;
newLimit.*otherVars* = _joint.linearLimit.*otherVars*; // if needed
_joint.linearLimit = newLimit;

hope it helps

Also have a look at the QuickRopes 2 Asset on the Asset Store. It’s not free but it’s powerful.