In this paper, we derive a coordinate-free formulation of a passive controller that makes a mechanical system track reference curves in a potential field. Contrary to conventional reference tracking, we do not specify a single time-varying trajectory that the system has to track. Instead, we specify a whole curve that the system has to stay on at all times. Using tools from differential geometry, we first derive a controller that makes the system move along arbitrary (smooth enough) reference curves while keeping the kinetic energy constant. We then apply the results to the case of movement in an artificial potential field, in which case, the reference curves are completely determined by the potential field and cannot be chosen arbitrarily. Simulation then shows the performance of the controller on a benchmark robot with two degrees of freedom.