Shooting to MousePosition

Hello,

I´m working on an 2D Shooter.
What I got so far is, that I can hit “Enemies” and shoot without hitting anything but my problem is, that the bigger the Distance between my Character and the MouseCursor is, the more my Projectile drifts apart from the Cursor.

Can anybody help my fixing this issue? So that the Projectile will “Fly” directly to my Mouse Cursor without drifting away?

Here is the Shooting part of my Code:

PlayerController:

private void AttackFar()
    {
            Vector3 target;
            Ray ray = Cam.ScreenPointToRay(Input.mousePosition);
            RaycastHit hit;
            if (Physics.Raycast(ray, out hit, Mathf.Infinity, 1 << LayerMask.NameToLayer("Figures")))
            {
                if (hit.collider.tag.Equals("Enemy"))
                {
                    Debug.Log(hit.point);
                    target = hit.point - transform.position;
                    WeaponFarth.Instance.Fire(target);
                }
            }
            else
            {
                Vector3 targetPoint = ray.origin + (ray.direction * 10);
                target = targetPoint - transform.position;
                WeaponFarth.Instance.Fire(target);      
            }
    }

WeaponFarth:

public void Fire(Vector3 direction)
    {
        GameObject Bullet = Instantiate(ProjectilePrefab, transform.position, transform.rotation) as GameObject;
        Bullet.rigidbody.velocity = transform.TransformDirection(direction * Projectile.Instance.Speed);
    }

Regards and Thanks in advance

MadAsAHatter

Got it Working, just had to use the normalized direction:

WeaponFarth:

public void Fire(Vector3 direction)
    {
        GameObject Bullet = Instantiate(ProjectilePrefab, transform.position, transform.rotation) as GameObject;
        Bullet.rigidbody.AddForce(direction.normalized * 5, ForceMode.VelocityChange);
    }