Controlling rotation and translation of an object