Hello Developers!
Recently I’ve ran into a weird bug which is that when I leave my lock on target camera mode the normal third person camera code has this werid offset issue. The character is still rotating, just offset. I’m assuming that it has to do with something of this section of code but I can’t figure it out.
local StartCFrame = CFrame.new((HumanoidRootPart.CFrame.Position)) * CFrame.Angles(0, math.rad(CameraAngleX), 0) * CFrame.Angles(math.rad(CameraAngleY), 0, 0)
local CameraCFrame = StartCFrame:ToWorldSpace(CFrame.new(1.5, 2, 10))
local CameraFocus = StartCFrame:ToWorldSpace(CFrame.new(1.5, 2, -10000))
Camera.CFrame = CFrame.new(CameraCFrame.Position, CameraFocus.Position)