Collision detection in both directions.