Alex Szpakowski 7 лет назад
Родитель
Сommit
4d5c4ef807
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/modules/physics/box2d/Body.cpp

+ 1 - 1
src/modules/physics/box2d/Body.cpp

@@ -429,7 +429,7 @@ bool Body::isTouching(Body *other) const
 
 
 	while (ce != nullptr)
 	while (ce != nullptr)
 	{
 	{
-		if (ce->other == otherbody)
+		if (ce->other == otherbody && ce->contact != nullptr && ce->contact->IsTouching())
 			return true;
 			return true;
 
 
 		ce = ce->next;
 		ce = ce->next;