Do not try to perform platform physics movement when there is no bounding box

This commit is contained in:
Arjen Hiemstra 2015-03-24 17:03:39 +01:00
parent d650cbe26c
commit cfe29a7b51

View File

@ -24,6 +24,9 @@ class PlatformPhysics:
continue continue
bbox = node.getBoundingBox() bbox = node.getBoundingBox()
if not bbox or not bbox.isValid():
continue
if not Float.fuzzyCompare(bbox.bottom, 0.0): if not Float.fuzzyCompare(bbox.bottom, 0.0):
self._signal_source = node self._signal_source = node
op = PlatformPhysicsOperation(node, Vector(0, -bbox.bottom, 0)) op = PlatformPhysicsOperation(node, Vector(0, -bbox.bottom, 0))