Multiphase collision detection