Select: Fits - Advanced Fits - Path Fits
Before you do this, you need to make a sketch of the path on the cam slot part (the purple curve below), and place a sketch point in the center of the moving part's end face (in preparation for the later fit). The cam groove is then mated to the center of the moving part. Drag the slotted part after the fit and it will move along the path.
I don't know if this is what you want, but just for reference.