I'm trying to rotate a camera without adding any roll to it. So far I believe the angles I want to use are:
local X = Camera.CoordinateFrame*CFrame.Angles(-math.rad(type.Delta.y),0,0) local Y = CFrame.new()*CFrame.Angles(0,-math.rad(type.Delta.x),0)
with type.Delta being the mouse movement. But then, I'm at a loss of how to apply this to the camera. I have CFrame position for it, but I need a way of applying the angles to it :/
You can use CFrame.Angles(X, Y, 0) to rotate on the x and y axis' and leave the z axis alone.
workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(X, Y, 0)
This will rotate the currentcamera in the x and y axis' by X and Y, respectively. CFrames carry both attitude and position, so you can just multiply one by a CFrame.Angles() to rotate by the respective angles.