From 5425bf6475e79d2acd9a8b16aaa9db73f52e9693 Mon Sep 17 00:00:00 2001 From: HubbleCommand <39958198+HubbleCommand@users.noreply.github.com> Date: Sun, 25 Aug 2024 17:42:54 +0200 Subject: [PATCH 1/2] 2d movement indent Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> --- tutorials/2d/2d_movement.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/2d/2d_movement.rst b/tutorials/2d/2d_movement.rst index 6216d4039..c46cf179b 100644 --- a/tutorials/2d/2d_movement.rst +++ b/tutorials/2d/2d_movement.rst @@ -233,7 +233,7 @@ on the screen will cause the player to move to the target location. func _input(event): #use is_action_just_pressed to only accept single taps as input instead of mouse drags if event.is_action_pressed("click"): - target = get_global_mouse_position() + target = get_global_mouse_position() func _physics_process(delta): velocity = position.direction_to(target) * speed From 7154161fb5285834c1dc6644949cdbd34a779bfb Mon Sep 17 00:00:00 2001 From: HubbleCommand <39958198+HubbleCommand@users.noreply.github.com> Date: Sun, 25 Aug 2024 17:43:19 +0200 Subject: [PATCH 2/2] 2d movement click movement drag corrections Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> --- tutorials/2d/2d_movement.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/2d/2d_movement.rst b/tutorials/2d/2d_movement.rst index c46cf179b..96b501a2a 100644 --- a/tutorials/2d/2d_movement.rst +++ b/tutorials/2d/2d_movement.rst @@ -231,7 +231,7 @@ on the screen will cause the player to move to the target location. var target = position func _input(event): - #use is_action_just_pressed to only accept single taps as input instead of mouse drags + # Use is_action_pressed to only accept single taps as input instead of mouse drags. if event.is_action_pressed("click"): target = get_global_mouse_position()