How do these two differ?
transform.eulerAngles = new Vector3(0,0,0);
and
transform.rotation = Quaternion.Euler(0,0,0);
How do these two differ?
transform.eulerAngles = new Vector3(0,0,0);
and
transform.rotation = Quaternion.Euler(0,0,0);
At this point, there isn’t much difference.
transform.eulerAngles is an accessor, it simply converts the rotation from/to quaternion.
The former will assign a Vector3 to a property that will convert it to a quaternion.
The latter will create a quaternion from a Vector3 and will assign it to the rotation.
In the end, it’s the same.
Though, if you want to use some variable, it’s better to do it like this transform.rotation = Quaternion.Euler(0, 0, zRotation);
as it won’t create a new Vector3 every time.