what is different between "transform.rotation=**" and "transform.Rotate()"? why the return of Quaternion.Angle(Quaternion a,Quaternion b) is Angle(float). I don't understand Quaternion very much!
Well, I don't understand very much of Quaternions, too. Maybe I can help you anyway.
transform.rotation
returns the current rotation of your object
transform.Rotate(x,y,z)
rotates your object
Quaternion.Angle(Quaternion a,Quaternion b)
returns the angle between these rotations
Quaternions represent rotations .If you have to deal with Quaternions I suggest you just use the class methods and variables. For example, the variable eulerangles of a Quaternion object represents the rotation around the 3 axes. In the scripting manual they show this code
// Create a rotation
var rotation = Quaternion.identity; // Assign a rotation 30 degrees around the y axis rotation.eulerAngles = Vector3(0, 30, 0); // print the rotation around the y-axis print(rotation.eulerAngles.y);
If you need to rotate a vector by a Quaternion you can use the * operator. Quite simple actually.