|
@@ -70,7 +70,10 @@ JPH_INLINE void ContactConstraintManager::WorldContactPoint::TemplatedCalculateF
|
|
|
else if constexpr (Type2 != EMotionType::Static)
|
|
else if constexpr (Type2 != EMotionType::Static)
|
|
|
relative_velocity = mp2->GetPointVelocityCOM(r2);
|
|
relative_velocity = mp2->GetPointVelocityCOM(r2);
|
|
|
else
|
|
else
|
|
|
- static_assert(false, "Static vs static makes no sense");
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ JPH_ASSERT(false, "Static vs static makes no sense");
|
|
|
|
|
+ relative_velocity = Vec3::sZero();
|
|
|
|
|
+ }
|
|
|
float normal_velocity = relative_velocity.Dot(inWorldSpaceNormal);
|
|
float normal_velocity = relative_velocity.Dot(inWorldSpaceNormal);
|
|
|
|
|
|
|
|
// How much the shapes are penetrating (> 0 if penetrating, < 0 if separated)
|
|
// How much the shapes are penetrating (> 0 if penetrating, < 0 if separated)
|
|
@@ -109,7 +112,10 @@ JPH_INLINE void ContactConstraintManager::WorldContactPoint::TemplatedCalculateF
|
|
|
else if constexpr (Type2 != EMotionType::Static)
|
|
else if constexpr (Type2 != EMotionType::Static)
|
|
|
relative_acceleration = inGravity * mp2->GetGravityFactor();
|
|
relative_acceleration = inGravity * mp2->GetGravityFactor();
|
|
|
else
|
|
else
|
|
|
- static_assert(false, "Static vs static makes no sense");
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ JPH_ASSERT(false, "Static vs static makes no sense");
|
|
|
|
|
+ relative_acceleration = Vec3::sZero();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// Calculate effect of accumulated forces
|
|
// Calculate effect of accumulated forces
|
|
|
if constexpr (Type1 == EMotionType::Dynamic)
|
|
if constexpr (Type1 == EMotionType::Dynamic)
|