Merge branch 'isnormalized_checks' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-isnormalized_checks

This commit is contained in:
Wojtek Figat
2024-08-15 15:21:58 +02:00
8 changed files with 60 additions and 42 deletions

View File

@@ -1963,7 +1963,7 @@ bool TerrainPatch::UpdateCollision()
bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, float& resultHitDistance, float maxDistance) const
{
ASSERT(direction.IsNormalized());
CHECK_RETURN_DEBUG(direction.IsNormalized(), false);
if (_physicsShape == nullptr)
return false;
Vector3 shapePos;
@@ -1974,7 +1974,7 @@ bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, floa
bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, float& resultHitDistance, Vector3& resultHitNormal, float maxDistance) const
{
ASSERT(direction.IsNormalized());
CHECK_RETURN_DEBUG(direction.IsNormalized(), false);
if (_physicsShape == nullptr)
return false;
Vector3 shapePos;
@@ -1992,7 +1992,7 @@ bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, floa
bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, float& resultHitDistance, TerrainChunk*& resultChunk, float maxDistance) const
{
ASSERT(direction.IsNormalized());
CHECK_RETURN_DEBUG(direction.IsNormalized(), false);
if (_physicsShape == nullptr)
return false;
Vector3 shapePos;
@@ -2030,7 +2030,7 @@ bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, floa
bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, RayCastHit& hitInfo, float maxDistance) const
{
ASSERT(direction.IsNormalized());
CHECK_RETURN_DEBUG(direction.IsNormalized(), false);
if (_physicsShape == nullptr)
return false;
Vector3 shapePos;