hasCollided() now detects collisions with all sides of an object