summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-02-12 08:39:49 -0300
committerJuan Linietsky <reduzio@gmail.com>2019-02-12 08:40:18 -0300
commitcb09abdbbdb01fdeb8462853ad7324a6d0af0c81 (patch)
tree0f045b83927021ff09b470bb53dccd1f8f6b6597
parentfb8dce3e2e609dc8dcf9009e98639ed107f482d4 (diff)
Fixed OWC for rigid bodies, closes #25732
-rw-r--r--servers/physics_2d/body_pair_2d_sw.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics_2d/body_pair_2d_sw.cpp b/servers/physics_2d/body_pair_2d_sw.cpp
index ccdaf0b508..46ea0fd65d 100644
--- a/servers/physics_2d/body_pair_2d_sw.cpp
+++ b/servers/physics_2d/body_pair_2d_sw.cpp
@@ -303,7 +303,7 @@ bool BodyPair2DSW::setup(real_t p_step) {
Contact &c = contacts[i];
if (!c.reused)
continue;
- if (c.normal.dot(direction) < 0)
+ if (c.normal.dot(direction) > 0) //greater (normal inverted)
continue;
valid = true;
@@ -326,7 +326,7 @@ bool BodyPair2DSW::setup(real_t p_step) {
Contact &c = contacts[i];
if (!c.reused)
continue;
- if (c.normal.dot(direction) < 0)
+ if (c.normal.dot(direction) < 0) //less (normal ok)
continue;
valid = true;