Rotate Yaw and Pitch with mouse and/or touch

Well, I have a stationary floating camera, pointing down towards the cube on an angle. When I am looking through that camera (which is always), I wan’t to be able to click and drag (Preferrably with touch) and have the cube rotate around its center point. I only need rotation on 2 axis. The up down axis and the left right axis, no need to twist. (Like moving a sim’s head around or a minecraft character’s head).

When its working, I should be able to click play, and then click and drag/touch and drag the cube around it’s center point. (Rotating on the spot).

Thanks for helping !