Path: blob/master/thirdparty/jolt_physics/patches/0003-backport-upstream-commit-365a15367.patch
45998 views
diff --git a/thirdparty/jolt_physics/Jolt/Physics/Constraints/ContactConstraintManager.cpp b/thirdparty/jolt_physics/Jolt/Physics/Constraints/ContactConstraintManager.cpp1index 972fc13583..09dfab4921 1006442--- a/thirdparty/jolt_physics/Jolt/Physics/Constraints/ContactConstraintManager.cpp3+++ b/thirdparty/jolt_physics/Jolt/Physics/Constraints/ContactConstraintManager.cpp4@@ -70,7 +70,10 @@ JPH_INLINE void ContactConstraintManager::WorldContactPoint::TemplatedCalculateF5else if constexpr (Type2 != EMotionType::Static)6relative_velocity = mp2->GetPointVelocityCOM(r2);7else8- static_assert(false, "Static vs static makes no sense");9+ {10+ JPH_ASSERT(false, "Static vs static makes no sense");11+ relative_velocity = Vec3::sZero();12+ }13float normal_velocity = relative_velocity.Dot(inWorldSpaceNormal);1415// How much the shapes are penetrating (> 0 if penetrating, < 0 if separated)16@@ -109,7 +112,10 @@ JPH_INLINE void ContactConstraintManager::WorldContactPoint::TemplatedCalculateF17else if constexpr (Type2 != EMotionType::Static)18relative_acceleration = inGravity * mp2->GetGravityFactor();19else20- static_assert(false, "Static vs static makes no sense");21+ {22+ JPH_ASSERT(false, "Static vs static makes no sense");23+ relative_acceleration = Vec3::sZero();24+ }2526// Calculate effect of accumulated forces27if constexpr (Type1 == EMotionType::Dynamic)282930