Browse Source

Merge branch 'master' of https://github.com/HubbleCommand/godot-docs

HubbleCommand 11 months ago
parent
commit
326abe77dd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tutorials/2d/2d_movement.rst

+ 2 - 2
tutorials/2d/2d_movement.rst

@@ -231,9 +231,9 @@ on the screen will cause the player to move to the target location.
     var target = position
     var target = position
 
 
     func _input(event):
     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"):
         if event.is_action_pressed("click"):
-		    target = get_global_mouse_position()
+            target = get_global_mouse_position()
 
 
     func _physics_process(delta):
     func _physics_process(delta):
         velocity = position.direction_to(target) * speed
         velocity = position.direction_to(target) * speed