ball/ball collision functional