as you can tell from the debug visuals, the AI I've made for my game has almost-working AI... except they always go straight to the corner and get stuck.
I have navigation set up on my tiles correctly, and my relevant movement code is down below (nav_node is the navigation agent on my enemy):
nav_node.set_target_position(player.global_position)
look_at(player.position)
var current_location = global_transform.origin
var next_location = nav_node.get_next_path_position()
var new_velocity = position.direction_to(next_location).normalized() * spd
move_and_collide(new_velocity)
please help, every tutorial I can find is either outdated or they do the exact same thing yet somehow don't have this issue. I've been at this for almost three days!