summaryrefslogtreecommitdiff
path: root/servers/physics
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics')
-rw-r--r--servers/physics/body_sw.h3
-rw-r--r--servers/physics/collision_solver_sat.cpp4
2 files changed, 6 insertions, 1 deletions
diff --git a/servers/physics/body_sw.h b/servers/physics/body_sw.h
index 8f5e6d8251..5df270f679 100644
--- a/servers/physics/body_sw.h
+++ b/servers/physics/body_sw.h
@@ -442,6 +442,9 @@ public:
ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3());
return body->contacts[p_contact_idx].local_normal;
}
+ virtual float get_contact_impulse(int p_contact_idx) const {
+ return 0.0f; // Only implemented for bullet
+ }
virtual int get_contact_local_shape(int p_contact_idx) const {
ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, -1);
return body->contacts[p_contact_idx].local_shape;
diff --git a/servers/physics/collision_solver_sat.cpp b/servers/physics/collision_solver_sat.cpp
index 44b7c9ac34..8f2b147460 100644
--- a/servers/physics/collision_solver_sat.cpp
+++ b/servers/physics/collision_solver_sat.cpp
@@ -348,7 +348,9 @@ public:
//use the smallest depth
- min_B = -min_B;
+ if (min_B < 0.0) { // could be +0.0, we don't want it to become -0.0
+ min_B = -min_B;
+ }
if (max_B < min_B) {
if (max_B < best_depth) {