transform.TransformDirection not working -- WHAT IM MISSISNG?

I can’t see what i missing, it looks like the direction in y axis is working but not working for x and z ones.

IMAGE1: Projectiles are going down
IMAGE2: Projectiles are going up


Rigidbody currentProjectile;

currentProjectile = Instantiate(Projectile.GetComponent<Rigidbody>(), transform.position + (transform.forward), enemy.transform.rotation) as Rigidbody;

currentProjectile.velocity = transform.TransformDirection((enemy.transform.position - transform.position).normalized * Projectile_velocity);

Like Hellium said in the comment, this part:

(enemy.transform.position - transform.position).normalized

already represents a world space direction vector between your player and the “enemy” object. The velocity vector of a rigidbody also represents a worldspace direction. TransformDirection would expect a local space vector as input and outputs a worldspace direction. Since you input a worldspace direction the result is just nonsense. So just do:

currentProjectile.velocity = (enemy.transform.position - transform.position).normalized * Projectile_velocity;