How Unity calculates Transform.forward
// The blue axis of the transform in world space.
public Vector3 forward {
get { return rotation * Vector3.forward;
} set {
rotation = Quaternion.LookRotation(value);
}
}