Finish the basic function to do the right collision check.