Ver Fonte

Fix Body:isTouching.

Alex Szpakowski há 7 anos atrás
pai
commit
4d5c4ef807
1 ficheiros alterados com 1 adições e 1 exclusões
  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)
 	{
-		if (ce->other == otherbody)
+		if (ce->other == otherbody && ce->contact != nullptr && ce->contact->IsTouching())
 			return true;
 
 		ce = ce->next;