local target = workspace.sub --this is a part local camera = workspace.CurrentCamera camera.CameraSubject = target local angle = 0 while true and wait() do camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part camera.Focus = camera.Focus * CFrame.new(1,0,0) end
It works for a few seconds then slows down and slightly pans downwards, what did I do wrong?
I don't understand matrix math, especially with CFrame, so I prefer to do camera manipulation manually:
local target = Workspace.sub local camera = Workspace.CurrentCamera camera.CameraSubject = target local angle = 0 --Starting anle, in degrees. local foc = Vector3.new(0, -.1, 0) --Only x and z are affected by the rotation math. You can change y freely. while wait() do foc = Vector3.new(math.cos(math.rad(angle)), foc.Y, math.sin(math.rad(angle))) camera.CoordinateFrame = CFrame.new(target.Position) camera.Focus = CFrame.new(target.Position + foc) angle = angle + .5 end