extends CharacterBody3D

@export var move_speed: float = 3.0
@export var hit_distance: float = 1.0
@onready var player: Node = get_tree().get_first_node_in_group("player")
@onready var anim: AnimationPlayer = $AnimationPlayer
# For PY
@export var cube_scene: PackedScene


func _process(_delta: float) -> void:
	if player:
		look_at(player.global_position, Vector3.UP, true)


func _physics_process(_delta: float) -> void:
	if player:
		var direction = (player.global_position - global_position).normalized()
		velocity = direction * move_speed
		
		# TODO 2
		
