Method to check for collision of two models