Merge branch 'patch-1' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-patch-1

This commit is contained in:
Wojtek Figat
2021-02-27 00:53:40 +01:00

View File

@@ -967,7 +967,17 @@ namespace FlaxEngine
Matrix3x3.LookAt(ref eye, ref target, ref up, out var matrix);
RotationMatrix(ref matrix, out result);
}
/// <summary>
/// Creates a left-handed, look-at quaternion.
/// </summary>
/// <param name="eye">The position of the viewer's eye.</param>
/// <param name="target">The camera look-at target.</param>
/// <returns>The created look-at quaternion.</returns>
public static Quaternion LookAt(Vector3 eye, Vector3 target){
return LookAt(eye, target, Vector3.Up);
}
/// <summary>
/// Creates a left-handed, look-at quaternion.
/// </summary>
@@ -993,6 +1003,16 @@ namespace FlaxEngine
LookAt(ref eye, ref forward, ref up, out result);
}
/// <summary>
/// Creates a left-handed, look-at quaternion.
/// </summary>
/// <param name="forward">The camera's forward direction.</param>
/// <returns>The created look-at quaternion.</returns>
public static Quaternion RotationLookAt(Vector3 forward)
{
return RotationLookAt(forward, Vector3.Up);
}
/// <summary>
/// Creates a left-handed, look-at quaternion.
/// </summary>
@@ -1005,6 +1025,16 @@ namespace FlaxEngine
return result;
}
/// <summary>
/// Creates a rotation with the specified forward and upwards directions.
/// </summary>
/// <param name="forward">The forward direction. Direction to orient towards.</param>
/// <returns>The calculated quaternion.</returns>
public static Quaternion LookRotation(Vector3 forward)
{
return LookRotation(forward, Vector3.Up);
}
/// <summary>
/// Creates a rotation with the specified forward and upwards directions.
/// </summary>