Checked out the project files, and here is the way I have it set up! (Godot 3.x)
The player is two sphere colliders, one is the parent which is a RigidBody2D with continuous_cd set to Cast Ray, linear_damp set to 1 and angular_damp set to 100; the second is a child KinematicBody2D which is the "hammer head" that follows the cursor.
Inside `_physics_process` is the main update step, which I cleaned up a bit:
var vector = get_global_mouse_position() - get_global_position() var clamped_mousepos = get_global_position() + vector.normalized() * min(110, vector.length()) var push_force = clamped_mousepos - $Hammer.get_global_position() if $Hammer.move_and_collide(push_force * 0.59) != null: apply_central_impulse(-push_force)
Essentially it gets the clamped cursor positions, uses that to determine where the "hammer" should move to, and if the movement finds solid ground, simply apply an inverse impulse to the parent. The magic numbers I used there are the mouse radius/max reach distance around the player (110), and the responsiveness with which the hammer follows the mouse cursor (0.59).
Cheers! Hope it helps!