diff --git a/Source/Engine/Core/Math/Quaternion.cs b/Source/Engine/Core/Math/Quaternion.cs
index ed09e7307..19eb199fe 100644
--- a/Source/Engine/Core/Math/Quaternion.cs
+++ b/Source/Engine/Core/Math/Quaternion.cs
@@ -975,8 +975,10 @@ namespace FlaxEngine
/// The camera look-at target.
/// The camera's up vector.
/// The created look-at quaternion.
- public static Quaternion LookAt(Vector3 eye, Vector3 target, Vector3 up = Vector3.Up)
+ public static Quaternion LookAt(Vector3 eye, Vector3 target, Vector3 up = null)
{
+ if(up == null)
+ up = Vector3.Up;
LookAt(ref eye, ref target, ref up, out var result);
return result;
}
@@ -999,8 +1001,10 @@ namespace FlaxEngine
/// The camera's forward direction.
/// The camera's up vector.
/// The created look-at quaternion.
- public static Quaternion RotationLookAt(Vector3 forward, Vector3 up = Vector3.Up)
+ public static Quaternion RotationLookAt(Vector3 forward, Vector3 up = null)
{
+ if(up == null)
+ up = Vector3.Up;
RotationLookAt(ref forward, ref up, out var result);
return result;
}
@@ -1011,8 +1015,10 @@ namespace FlaxEngine
/// The forward direction. Direction to orient towards.
/// Up direction. Constrains y axis orientation to a plane this vector lies on. This rule might be broken if forward and up direction are nearly parallel.
/// The calculated quaternion.
- public static Quaternion LookRotation(Vector3 forward, Vector3 up = Vector3.Up)
+ public static Quaternion LookRotation(Vector3 forward, Vector3 up = null)
{
+ if(up == null)
+ up = Vector3.Up;
LookRotation(ref forward, ref up, out var result);
return result;
}