Original Post
Yeah, last duplicate - not sure where to post this... :-/ Hey, I've been working in Direct3D and am trying to make a camera. I know that D3D supplies a function to do this via LookAtxH, but I would like my camera to rotate the view around the X-axis when the user drags the mouse up and down, but rotate left (not around an axis, but dependent to the current viewer). Currently I have the up and down motion working, but I cannot for the life of me figure out how to get the adapted rotation working. I was originally trying to set a unit vector in the Y-direction, rotate it around the X-axis and then do a RotateAroundAxis transform as well as my RotateAroundX and Translation. This just gives me some weird results and I know that I'm doing something way wrong. The only other thing I can think of is to use polar coordinates and to calculate the position of the camera, then to rotate it around its local x and z axes in order to point it back to the origin, but I'm not too sure how to approach this. Any help would be appreciated.