GMS 2 Weird behaviors of rope joints




I'm currently using a rope joints (physics_joint_rope_create) to connect multiple "rope segments" and create a rope. This method is very popular for making a rope and so far it's been working fine for me - 2 objects connected with a rope will move together in a believable fashion.

However, there's this weird behavior of the joints when 2 of them get slightly separated through a wall (which they were supposed to collide with), one of them would fall down, as if it was connected to nothing. Illustrated below:

Normal rope:

Collide with ground:

Weird stuffs (pt. 1)
Note the the black lines are simply drawn between 2 segments, they have no physical properties.

Weird stuffs (pt. 2)
The box has the same density as any rope segment.

Just for reference, here's my code that connects the segment:
var offset = 0;
var maxLength = 0.1;

var    nextRope = instance_create_layer(x, y, "instances", obj_rope);
var heli = instance_nearest(x, y, obj_heli);
var attach = physics_joint_rope_create(heli, nextRope, heli.x, heli.y, nextRope.x, nextRope.y, maxLength, false);
physics_joint_set_value(attach, phy_joint_max_length, maxLength);

with (nextRope) {
    lastRope =;   

repeat(100) {
    var currentRope = nextRope;
    nextRope = instance_create_layer(x, y + offset, "instances", obj_rope);
    var link = physics_joint_rope_create(currentRope, nextRope, currentRope.x, currentRope.y, nextRope.x, nextRope.y, maxLength, false);
    physics_joint_set_value(link, phy_joint_max_length, maxLength);
    with (nextRope) {
        lastRope = currentRope;   

var box = instance_nearest(x, y, obj_box);
attach = physics_joint_rope_create(nextRope, box, nextRope.x, nextRope.y, box.x, box.y, maxLength, false);
Really hope someone can put out some thoughts and opinions on this so I can have a direction to fix this problem. Thinking about actually restricting the movement of the segments from eachother by code but that could potentially ruin the integrity of the physics system.


Friendly Tyrant
Forum Staff
Slightly off topic (but could be related), why are you creating 100 rope instances and joints???? Looking at the screenshots, it seems to me that you could easily get away with much fewer, like 20 or so....I'm wondering if having so many connected like that is maybe causing the Box2D library to freak out a bit....