collision detection between types