Browse Source

Fix Body:isTouching.

Alex Szpakowski 7 years ago
parent
commit
4d5c4ef807
1 changed files with 1 additions and 1 deletions
  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;