How do I combine a rotational and translational motion in keyshot?

I'm trying to do an animation of a pneumatic cylinder, coupled to a machine, the pneumatic cylinder is responsible for a certain movement.
As the piston comes out, the entire cylinder rotates up, but I've not been able to achieve this.
I need help on it please, ASAP.