if Input.is_action_pressed(“grapple”):
raycast.target_position = get_global_mouse_position() - global_positionif raycast.is_colliding(): print($RayCast2D.get_collision_point( )) $RopeLine.visible = true $RopeLine.set_point_position(0, Vector2.ZERO) $RopeLine.set_point_position(1, raycast.get_collision_point() - get_parent().position) else: $RopeLine.visible = false
if Input.is_action_just_released(“grapple”):
pass
I’m trying to make a grapple hook for my game, I’m trying to get the grapple hook to stay in one position when you click. the line2d goes through the block that the raycasts detects