Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/jolt_physics/patches/0003-backport-upstream-commit-365a15367.patch
45998 views
1
diff --git a/thirdparty/jolt_physics/Jolt/Physics/Constraints/ContactConstraintManager.cpp b/thirdparty/jolt_physics/Jolt/Physics/Constraints/ContactConstraintManager.cpp
2
index 972fc13583..09dfab4921 100644
3
--- a/thirdparty/jolt_physics/Jolt/Physics/Constraints/ContactConstraintManager.cpp
4
+++ b/thirdparty/jolt_physics/Jolt/Physics/Constraints/ContactConstraintManager.cpp
5
@@ -70,7 +70,10 @@ JPH_INLINE void ContactConstraintManager::WorldContactPoint::TemplatedCalculateF
6
else if constexpr (Type2 != EMotionType::Static)
7
relative_velocity = mp2->GetPointVelocityCOM(r2);
8
else
9
- static_assert(false, "Static vs static makes no sense");
10
+ {
11
+ JPH_ASSERT(false, "Static vs static makes no sense");
12
+ relative_velocity = Vec3::sZero();
13
+ }
14
float normal_velocity = relative_velocity.Dot(inWorldSpaceNormal);
15
16
// How much the shapes are penetrating (> 0 if penetrating, < 0 if separated)
17
@@ -109,7 +112,10 @@ JPH_INLINE void ContactConstraintManager::WorldContactPoint::TemplatedCalculateF
18
else if constexpr (Type2 != EMotionType::Static)
19
relative_acceleration = inGravity * mp2->GetGravityFactor();
20
else
21
- static_assert(false, "Static vs static makes no sense");
22
+ {
23
+ JPH_ASSERT(false, "Static vs static makes no sense");
24
+ relative_acceleration = Vec3::sZero();
25
+ }
26
27
// Calculate effect of accumulated forces
28
if constexpr (Type1 == EMotionType::Dynamic)
29
30