Shoot on Mouse Drag

Hey, I’am trying to make a top down 2D shooter like Geometry Wars and I want to make it so the bullets fire where the mouse is pointed without having to click like in Geometry Wars.

Any help is appreciated.
Regards.

You can calculate the dir with

dir = target.transform.position - transform.position;