diff --git a/Source/Engine/Core/Math/Ray.cs b/Source/Engine/Core/Math/Ray.cs index 3ed5e8257..8998cbb2a 100644 --- a/Source/Engine/Core/Math/Ray.cs +++ b/Source/Engine/Core/Math/Ray.cs @@ -57,6 +57,7 @@ using Real = System.Single; using System; using System.Globalization; using System.Runtime.CompilerServices; +using FlaxEngine.Assertions; namespace FlaxEngine { @@ -77,6 +78,7 @@ namespace FlaxEngine { Position = position; Direction = direction; + Assert.IsTrue(Direction.IsNormalized, "The Ray Direction was not normalized"); } ///