Can't move lookVector camera to the right or left

I want to create a custom shift-lock like camera, but when I try to move it to the right over the shoulder it goes in circles. I know the issue but I can’t find a solution.

example of the issue:

the problem is in the ‘tween’ variable, when I add 5 studs on one axis

game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable

while wait() do
	local TS = game:GetService("TweenService")
	local tweenInfo = TweenInfo.new(0.16, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
	local head = game.Players.LocalPlayer.Character.Head
	local headFrame = head.CFrame
	local headLookVector = headFrame.lookVector
	local tween = TS:Create(game.Workspace.CurrentCamera, tweenInfo, {CFrame=headFrame + (headLookVector * Vector3.new(-10, -10, -10)) + Vector3.new(5, 0, 0)})
	tween:Play()
end

sorry if this is a mess of a post

1 Like

That’s because you are constantly offsetting the cameral location relative to the lookvector of the head, since you are not moving your head, it will be offsetted in a weird way.\

To fix this, make the camera be relative to the heads look vector to the camera.

CFrame = headFrame + (CFrame.new(Head.Position, Camera.Position).LookVector * Vector3.new(-10, -10, -10)) + Vector3.new(5, 0, 0)

after messing with this for a while I couldn’t get it to work, the best I got was a buggy mess where the camera had a seizure