#How to make like this in Godot rope climbing

7 messages · Page 1 of 1 (latest)

sacred epoch
sacred epoch
#

Physic based rope

rare solstice
#

A bunch of pin joints should do the trick, but it might be tedious to set up.

sacred epoch
alpine osprey
#

to climb the rope i would personally just add an area to either the player or the ropes that changes some is_on_rope variable and then add an if statement that cecks if it is true and if so allows the w and s to be used to climb up and down and also ignorres gravity and then put the normal logic in and else statement. But i'm a noob at godot and this might be super impractical in reality

sacred epoch
#

nice basic logic but i need physic base rope rigid body and i am using rigid body player controller anyway thanks for trying to help 🙂

unborn prism
#

Pin joints would indeed work here, however, you'd need to basically add an area to each section to detect which one your character is grabbing, then instantiate a new pin joint to attach your player to it (this way you get to keep the rigidbody of your player as a physics object and have it integrate in the rope's chain of joints, sort of). I haven't tried this before, but I think it should work. I'm fairly certain you can have more than one pin joint attached to the end of another pin joint. You could define a rope as a Line2D and use the points in that Line2D as the positions to generate and orient your pin joints in code, then have the Line2D update its points to wherever those pin joints' positions get moved to by the physics engine. You could then use a seamlessly tiling rope texture as the texture in the Line2D and have a very rope-looking rope, too. This part I have done before.