Crea una rotación que gira desde fromDirection a toDirection.
Usualmente usa esto para rotar una transform para que uno de sus ejes, por ejemplo. El eje y - siga una dirección objetivo toDirection en el espacio mundial.
using UnityEngine;
public class Example : MonoBehaviour { void Start() { // Sets the rotation so that the transform's y-axis goes along the z-axis transform.rotation = Quaternion.FromToRotation(Vector3.up, transform.forward); } }