I'm having a problem creating a Vector3 variable, starting with 2 other float variables. This is a snipped of code:
float indz = Mathf.Cos(alpha);
float indx = Mathf.Sin(alpha);
Vector3 ind = new Vector3(indx,0,indz);
the variables' value are:
indz = 0.999954
indx = 0.009595863
the resulting vector is:
ind = (0.0, 0.0, 1.0)
Why this? And how can I avoid this issue? I need that vector because I have to transform it in the coordinate system of another object, and I need it at the maximum precision. Thanks!