فهرست منبع

Fixed OWC for rigid bodies, closes #25732

Juan Linietsky 6 سال پیش
والد
کامیت
cb09abdbbd
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      servers/physics_2d/body_pair_2d_sw.cpp

+ 2 - 2
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;