Implement check collision with matrice