Help Rotating Objects in Viewport Frame

I have my character in a viewport frame already, but I would like to figure out how to make it rotate side to side based on my mouse movement when I click and drag. There isn’t much documentation I could find so I figured I would ask here. Not requesting a whole script, just a general method. Thanks!