Fixed bug that caused crash when object was entirely below platform

This commit is contained in:
Jaime van Kessel 2015-08-13 13:35:51 +02:00
parent a63d08288a
commit ddc34eaa3a
3 changed files with 9 additions and 8 deletions

View file

@ -113,8 +113,10 @@ class PlatformPhysics:
move_vector.setX(overlap[0] * 1.1)
move_vector.setZ(overlap[1] * 1.1)
convex_hull = node.callDecoration("getConvexHull")
convex_hull = node.callDecoration("getConvexHull")
if convex_hull:
if not convex_hull.isValid():
return
# Check for collisions between disallowed areas and the object
for area in self._build_volume.getDisallowedAreas():
overlap = convex_hull.intersectsPolygon(area)