diff --git a/tutorials/2d/2d_movement.rst b/tutorials/2d/2d_movement.rst index db99a86c5..1f5da929b 100644 --- a/tutorials/2d/2d_movement.rst +++ b/tutorials/2d/2d_movement.rst @@ -254,7 +254,8 @@ on the screen will cause the player to move to the target location. public override void _Input(InputEvent @event) { - if (Input.IsActionPressed("click")) + // Use IsActionPressed to only accept single taps as input instead of mouse drags. + if (@event.IsActionPressed("click")) { _target = GetGlobalMousePosition(); }