Uh, did not read your code close enough. You have some more things going on there, that you have to clean up. E.g. you are the navigation agents target position in multiple ways and also choose different target locations while you do so.
It may also be related to your state handling, maybe the idle
and move
variables are set up in a way that they block actual movement. I recommend to set some break points and use the debugger to go through your code step by step and see what is happening. Maybe calling the idle function in the move function causes some issues.
I’m also not sure if you have set up the navigation correctly, e.g. if you have the navmesh created correctly. See 3D navigation overview — Godot Engine (stable) documentation in English for reference.
On the other hand: If I interpret your first screenshot correctly, Billie should simply move on a square area? If yes, you don’t necessarily need navmesh navigation and you could simply move in a straight line:
func _Billie_move():
print("Billie is moving!")
var SwimAnims = ["Floating", "Diving"]
AP.play(SwimAnims.pick_random())
moving = true
var random_target = target_array.pick_random()
var target_vector = random_target.global_position - global_position
velocity = target_vector.normalized() * 5
func _physics_process(delta):
move_and_slide()
Sorry, I cannot try this right now, so you have to fix any typos or mistakes that I did by yourself