From d1ef1d6f4f7b2572a92233066a71d6c785868107 Mon Sep 17 00:00:00 2001 From: Nathan Singer Date: Sun, 27 Apr 2025 19:02:18 -0400 Subject: [PATCH] fixes tapping while dragging issue --- card.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/card.gd b/card.gd index 7af90a7..54922ea 100644 --- a/card.gd +++ b/card.gd @@ -44,7 +44,7 @@ func _pivot() -> int: func _physics_process(delta: float) -> void: if is_dragging == true: var tween = get_tree().create_tween() - tween.tween_property(self, "position", get_global_mouse_position() - mouse_offset.rotated(deg_to_rad(-1.0 * _pivot())), delay * delta) + tween.tween_property(self, "position", get_global_mouse_position() - mouse_offset, delay * delta) if is_pivot == true: var tween = get_tree().create_tween() tween.tween_property(self, "rotation_degrees", _pivot(), delta * delay) @@ -74,6 +74,7 @@ func _unhandled_key_input(event: InputEvent) -> void: else: current_pivot = pivot.ROTATE_0 is_pivot = true + set_pivot_offset(size / 2) func _card_error(error_type: String) -> String: return "ERROR::CARD::%s::%s::%s::\n" % [card_id, card_name, error_type]