Method SafeFromToRotation
SafeFromToRotation(Vector3, Vector3, Vector3)
Much more stable for small angles than Unity's native implementation
Declaration
public static Quaternion SafeFromToRotation(Vector3 v1, Vector3 v2, Vector3 up)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | v1 | The first vector |
Vector3 | v2 | The second vector |
Vector3 | up | Definition of up (used to determine the sign) |
Returns
Type | Description |
---|---|
Quaternion | Rotation between the vectors |