If you need translational motion in two directions, you can't use the one DOF. I have never tried this but I believe you can restrict rotational motion by using the 6DOF UDF and that way you have translation in the X and Y directions.
Maybe someone in the community might have some insights towards this.