Преглед изворни кода

Ignore Bullet collision contact points with distance = 0

(cherry picked from commit 27b52f6c46bd6d70fd667d34b5b44f954dd786ac)
Marcel Admiraal пре 4 година
родитељ
комит
14ecd66a21
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      modules/bullet/space_bullet.cpp

+ 1 - 1
modules/bullet/space_bullet.cpp

@@ -855,7 +855,7 @@ void SpaceBullet::check_body_collision() {
 				btManifoldPoint &pt = contactManifold->getContactPoint(0);
 				btManifoldPoint &pt = contactManifold->getContactPoint(0);
 #endif
 #endif
 				if (
 				if (
-						pt.getDistance() <= 0.0 ||
+						pt.getDistance() < 0.0 ||
 						bodyA->was_colliding(bodyB) ||
 						bodyA->was_colliding(bodyB) ||
 						bodyB->was_colliding(bodyA)) {
 						bodyB->was_colliding(bodyA)) {
 					Vector3 collisionWorldPosition;
 					Vector3 collisionWorldPosition;