fuzzyworld

godot-shooter / commit

Changed debug to the click position.

592bb6ef388d36a2ae24f059239bbd6cd2bfc042 · Pavel Safronov · 2023-11-01 22:49:20 -0700 · parents a71b5173c5f3

Changed debug to the click position.
 World.gd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/World.gd b/World.gd
index e78bb5b..50ba7c8 100644
--- a/World.gd
+++ b/World.gd
@@ -43,12 +43,12 @@ func _process(_delta: float) -> void:
 		var unit = diff.normalized()
 		$Player.velocity = unit * $Player.move_speed
 		$Destination.visible = true
-		$CanvasLayer/HUD.debug_text = "player velocity = %s, %s" % [($Player.velocity.x), ($Player.velocity.y)]
 	else:
 		$Destination.visible = false
 		$Player.velocity = Vector2.ZERO
 
 func set_destination(pos: Vector2) -> void:
+	$CanvasLayer/HUD.debug_text = "%.1f,%.1f" % [pos.x, pos.y]
 	destination = pos
 	is_destination_set = true
 	$Destination.position = pos