GMS 2 Help with Rope and physics_joint_set_value

vreetech

Member
Hey

I've been messing with some GMS2 physics but have come into a problem which I hope someone can help with.

I've a basic side on platformer and can tether utilizing physics_joint_rope_create, which works perfectly well. The problem is I'm wanting "wind" and "unwind" the rope, which I'm attempting to do with using physics_joint_set_value. It's behaving strange however and I cant get my head around it. Pressing "W" calls this:

CurrentLength = physics_joint_get_value(Grapple, phy_joint_max_length);
physics_joint_set_value(Grapple, phy_joint_max_length, CurrentLength - 0.00001);

It seems to be altering the decimal point and putting 000's on it, rather than what I'm trying to do. Assume this is rounding, data type, math fail on my part.

Any help would be appreciated.

Cheers!
 
Top