Rope for Kinematic2D's icon

Rope for Kinematic2D 1.0 Demos 3.2 Community

Submitted by user meloonics; MIT; 2020-11-12

Unlike RigidBody2D (RB2D), KinematicBody2D (KB2D) is not affected by outside physical forces. It only moves, where it is programmed to move. And it has the very convenient "move_and_slide()" function for it, which RB2D doesn't have, unfortunately. If you tie a KB2D to a Rope made of RB2Ds and move it, the Rope will be overstretched and glitches out, since KB2D isn't affected by the rope's physics. The solution for this problem is to manipulate the velocity vector of KB2D. Usually you only program the Inputs in and that's it. In our case, we will add a pull-vector, which points to the direction, in which the rope would pull, to our velocity vector.


View files Download Submit an issue Recent Edits