godot-shooter / commit
Trying to convert the mobile position to global position.
World.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/World.gd b/World.gd index 50ba7c8..76b5b25 100644 --- a/World.gd +++ b/World.gd @@ -31,7 +31,7 @@ func add_new_enemy(should_be_visible: bool = false) -> void: func _input(event: InputEvent) -> void: if event is InputEventScreenTouch: if event.pressed && !$Player.dead: - set_destination(event.position) + set_destination(to_global(event.position)) func _process(_delta: float) -> void: if Input.is_action_just_pressed("click") and !$Player.dead: