extends Area2D var speed = 1500 func _physics_process(delta): position = calculateTrajectory(delta, transform) func _on_Bullet_body_entered(body): if body.is_in_group("mobs"): body.queue_free() queue_free() func calculateTrajectory(delta, the_transform): var new_position = position new_position += the_transform.y * -speed * delta return new_position