This paper addresses the synchronization problem of mechanical systems subjected to a single geometric unilateral constraint. The impacts of the individual systems, induced by the unilateral constraint, generally do not coincide even if the solutions are arbitrarily ‘close’ to each other. The mismatch in the impact time instants demands a careful choice of the distance function to allow for an intuitively correct comparison of the discontinuous solutions resulting from the impacts. We propose a distance function induced by the quotient metric, which is based on an equivalence relation using the impact map. The distance function obtained in this way is continuous in time when evaluated along jumping solutions. The property of maximal monotonicity, which is fulfilled by most commonly used impact laws, is used to significantly reduce the complexity of the distance function. Based on the simplified distance function, a Lyapunov function is constructed to investigate the synchronization problem for two identical one-dimensional mechanical systems. Sufficient conditions for the uncoupled individual systems are provided under which local synchronization is guaranteed. Furthermore, we present an interaction law which ensures global synchronization, also in the presence of grazing trajectories and accumulation points (Zeno behavior). The results are illustrated using numerical examples of a 1-DOF mechanical impact oscillator which serves as stepping stone in the direction of more general systems.