I guess I really don’t understand CFrames and how they interact with Vector3s, but I literally can’t get my camera to just rotate to the left by 90 degrees. It always winds up tilted or just going the opposite direction. This is a top-down, over the shoulder camera. i.e:
It looks like cameraPart is free to rotate on it’s own. You might want to control it’s rotation if you are using it’s cframe for the camera.
Another approach you could try is to use the cameraPart solely for it’s position. You can use cam.CFrame = CFrame.LookAt(cameraPart.Position, hrp.Position) to create a cframe at the cameraPart, that is looking at the hrp.
I’m really not sure how to control the rotation of the cameraPart. I can’t rotate it on my own because it’s not anchored, and I can’t anchor it because then the camera won’t move. Unless I’m completely misunderstanding how this camera system is working.
This almost works, but it only rotates the camera to the left when the character model turns to the left (but it is a nice effect to add to the camera, so much appreciated for that). I need the camera, by default, to be rotated in the world space by about 90 degrees.
And I actually think that this is the problem. The orientation of the cameraPart is just wrong. And I’m not sure how to update that in relation to how I have it set up now. Ideally, I’d just rotate the cameraPart and everything else would fall in line with it since it’s attached to the cameraPart. I just can’t figure out how to rotate it while keeping the over-the-shoulder effect.
Looks like I really did overcomplicate it. The issue was that the cameraPart was oriented the wrong direction, so I just changed the axis that I used in the Vector3 for it’s CFrame, and that fixed my problem (with the added look effect from @VitalWinter).