So I have this issue that when the camera is rotated on its Z axis, the mouse movements dont match the camera movements anymore.
I am running this code every renderstep:
Workspace.CurrentCamera.CFrame = Workspace.CurrentCamera.CFrame:ToWorldSpace(CFrame.Angles(0, 0, math.rad(90)))
which rotates the camera 90 degrees counterclockwise (the ground is to the left).
However, moving the mouse left and right (while shift lock is on) would move the camera up and down when the camera is rotated on the Z axis.
I want it so that the camera can be controlled by the mouse relative to itself, even if its rotated on the Z axis.
Similiar to how in egomoose’s wall stick controller, it can rotate the camera sideways but still be able to move it properly with the mouse. I have tried to find the code that makes it able to do that, but couldn’t
I feel like I need to put something into the camera module, but I don’t know what or where to put it.
any help is appreciated!