Sunroof style motion - conceptual issues
Add a follow path constraint and have the object follow a curve (yes both objects have to have their origins on the same place).

By controlling the offset you can make the object travel along the curve.

To control rotation use an empty as the control object for a copy rotation constraint.