navigation2D spikes and jitter

Godot Version

4.4.1

Question

Hello,
anyone know the best way to make an enemy chase the player ?
Ive messed with the NavigationRegion2D node, but something doesnt seem right,

In NavigationRegion2D, i cant draw the polygon manually, or edit the points in the holes manually !
for some reason the enemy jitters and creates spikes in the path

enemy script

extends CharacterBody2D

const SPEED = 200.0
@onready var navigation_agent: NavigationAgent2D = $NavigationAgent2D
@export var targetChase: CharacterBody2D;

func _physics_process(_delta: float) -> void:
	if ( targetChase ):
		navigation_agent.target_position = targetChase.global_position;
	if ( navigation_agent.is_navigation_finished() ):
		return
	var current_agent_position = global_position;
	var next_path_position = navigation_agent.get_next_path_position();
	velocity = current_agent_position.direction_to(next_path_position) * SPEED
	move_and_slide()

anyone know how to get the crap navigation2d to work ?
It just looks so stupid…
It looks like one of those ingenious things, that were just supossed to do 1 simple thing…
instead

it needs 2 nodes to work ( 1 of them a big polygon )

it comes with 1000 buttons on it and options !!?! to make it look good or something ?!?!

I dont get it !!! what going on in here ?!?!
Is this one also a school project !?!? Or a car radio app ?!?! One of those that gets an A grade from mommy and daddy ?!?!

How about reading the documentation? You changed the Path Postprocessing to Edgecentered, which is the reason for the “spikes”. (Your agent moves from edge center to edge center.)