I've managed to get my sprite enemies shoot at the player with
@export var bullet_speed = 100
@onready var p = get_node("/root/main/player")
@onready var target_pos = p.global_position
func _physics_process(delta):
var dir = self.global_position.direction_to(target_pos)
global_position.x += (dir.x * bullet_speed) * delta
global_position.y += (dir.y * bullet_speed) * delta
However, the projectiles will reach their destination and then stop. I'm not sure why. I thought I was get the angle between them and send them off in that direction (until they get to edge of the screen), rather than a location.
I need them to overshoot so the projectiles move beyond their original target. Do I need to do a bit of trig, calculate the opposite and adjacent, double it and then send them to that location?