func _physics_process(delta):
#if the the enemy has reached the end of the current path create a new path
if counter > path.size()-1:
counter = 0
path = get_parent().get_node("Map").get_simple_path(get_translation(), get_parent().get_node("Player").get_translation())
var enemyPos = get_translation()
var vector = Vector2(path[counter].x - enemyPos.x, path[counter].z - enemyPos.z)
#finds the distance to the goal
var distancesq = vector.length_squared()
vector = vector.normalized()
set_linear_velocity(Vector3(vector.x, 0, vector.y)*speed)
set_translation(Vector3(enemyPos.x, 1, enemyPos.z))
#checks to see if its roughly near the current path point if so advances the path
if((enemyPos.x >= path[counter].x-precision && enemyPos.x <= path[counter].x+precision) && (enemyPos.z >= path[counter].z-precision && enemyPos.z <= path[counter].z+precision)):
counter += 1

The code above is the only code directly manipulating the purple enemy model. I have attempted to use the impulse method rather then the linear movement but i never managed to achieve the needed results(i couldn't get it to even follow the path). How can i make this movement smoother? I have little experience in this specific engine, any help would be appreciated!