FromToRotation(float3, float3)
Returns a quaternion that rotates the direction from onto the direction to. The two input vectors are not assumed to be unit length, but must not be zero length, point in opposite directions, or be of such extreme magnitude that squaring their length overflows. If these assumptions are not met use quaternion.FromToRotationSafe instead.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
public static quaternion FromToRotation(float3 from, float3 to)
Parameters
Returns
Type | Description |
|---|---|
| quaternion | The unit quaternion that rotates from onto to. |