i am having kind of a weird problem with the Vector3.Angle function. it seems to give me a wrong result.
for example,look at this code :
//update forward vectors
carForward = car.transform.forward;
camForward = cam.transform.forward;
camForward.y = 0;
// calculate the angle between the car's forward vector and the camera's forward vector
float carCamAngle = Vector3.Angle(carForward,camForward);
Debug.Log(carCamAngle);
Debug.Log(carForward);
Debug.Log(camForward);
in this code,camForward and carForward are vector3 variables that are equal to (0,0,1). yet,after i use Vector3.Angle with these two variables the result i get is 1.705021,when clearly i should be getting a zero
i can’t really figure what i did wrong there. has anyone got any idea?