func _physics_process(delta):
var target
var closest_distance = 9223372036854775807 # max int
for node in get_tree().get_nodes_in_group("<GroupName>"):
var distance = global_position.distance_to(node.global_position)
if distance < closest_distance:
closest_distance = distance
target = node
if target:
look_at(target)
velocity = transform.x * speed
move_and_slide()