Implemented Entity collision detection.