Sine/Cosine from transform.rotation.y

I’m trying to make a projectile fire in the same direction of the crosshair, but for some odd reason I can’t seem to get the values right or something. It starts out fine with values of 1 and 0, but if I turn 90 degrees right it’s not a round number or even close.


Do you converted the angle to radians ? The parameters in these function have to be in radians.
Multiply the value used in Sin / Cos by Mathf.Deg2Rad


float x = Mathf.Cos(angle * Mathf.Deg2Rad);