Fixed push free for one at a time

This commit is contained in:
Jaime van Kessel 2015-09-08 13:31:16 +02:00
parent f3eefd7be1
commit dfe4b348b4
3 changed files with 5 additions and 2 deletions

View file

@ -114,6 +114,10 @@ class PlatformPhysics:
head_hull = node.callDecoration("getConvexHullHead")
if head_hull:
overlap = head_hull.intersectsPolygon(other_node.callDecoration("getConvexHull"))
if not overlap:
other_head_hull = other_node.callDecoration("getConvexHullHead")
if other_head_hull:
overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_head_hull)
else:
overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_node.callDecoration("getConvexHull"))
except: