Well, as the title said, I want to make the player camera only rotate on the X-axis while Y-axis is locked. This type of camera was used in some games like Doom (old retroversion) and other games using ray casting. Sure I could try to use key binds but I want to make the camera moves using the mouse, how can I do this?
I guess you can also multiple the camera look direction by a vector of:
Vector3.new(1, 0, 1))
This will remove the y-axis of the camera’s look direction like in doom.
Then you can achieve something similar to this CFrame rotation:
Since rotating the Camera operates in a similar fashion to CFrame manipulation since you need to control the position and orientation of the camera this neat property to remove the y-axis of the look direction should apply as well.
Thread where I limit the CFrame rotation which could apply for your camera’s CFrame rotation scenario as well.
2 Likes