Use CHECK_DEBUG over ASSERT in normalized direction checks
This commit is contained in:
@@ -71,7 +71,7 @@ void Collider::SetContactOffset(float value)
|
||||
|
||||
bool Collider::RayCast(const Vector3& origin, const Vector3& direction, float& resultHitDistance, float maxDistance) const
|
||||
{
|
||||
ASSERT(direction.IsNormalized());
|
||||
CHECK_RETURN_DEBUG(direction.IsNormalized(), false);
|
||||
resultHitDistance = MAX_float;
|
||||
if (_shape == nullptr)
|
||||
return false;
|
||||
@@ -80,7 +80,7 @@ bool Collider::RayCast(const Vector3& origin, const Vector3& direction, float& r
|
||||
|
||||
bool Collider::RayCast(const Vector3& origin, const Vector3& direction, RayCastHit& hitInfo, float maxDistance) const
|
||||
{
|
||||
ASSERT(direction.IsNormalized());
|
||||
CHECK_RETURN_DEBUG(direction.IsNormalized(), false);
|
||||
if (_shape == nullptr)
|
||||
return false;
|
||||
return PhysicsBackend::RayCastShape(_shape, _transform.Translation, _transform.Orientation, origin, direction, hitInfo, maxDistance);
|
||||
|
||||
Reference in New Issue
Block a user