Implemented collision.