Your code was too confusing so I deleted everything. See how the target moves in the opposite direction of the mouse? Fire - Click / Space