Detecting distance travelled (Cartesian)