1D and 2D collision