Changed magnet moving motion to a sliding motion, rather than a sticking motion. Fixed 0 case, where magnets can overlap if one of the z components of the cross product is 0.