local P=game:GetService("Players"); local LP=P.LocalPlayer local FC=require(LP.PlayerScripts.Controllers.FighterController); local lf=FC.LocalFighter local K0,K1 = utf8.char(0), utf8.char(1) local C0,C1,C2,C3,C4,C5 = utf8.char(0),utf8.char(1),utf8.char(2),utf8.char(3),utf8.char(4),utf8.char(5) local cam = workspace.CurrentCamera local function decode(d) local t = d[K0] return Vector3.new(t[C0], t[C1], t[C2]), t[C3], t[C4], t[C5] end local function with_cam(dir, fn) local saved = cam.CFrame cam.CFrame = CFrame.lookAt(saved.Position, saved.Position + dir) local r = fn() cam.CFrame = saved return r end local d = lf:GetCameraData() local pos, pitch, yaw = decode(d) print(string.format("base : look=(%.3f,%.3f,%.3f) pitch=%.4f yaw=%.4f", cam.CFrame.LookVector.X, cam.CFrame.LookVector.Y, cam.CFrame.LookVector.Z, pitch, yaw)) local function probe(dir, label) local dd = with_cam(dir, function() return lf:GetCameraData() end) local p, pi, ya = decode(dd) print(string.format("%-10s: dir=(%.2f,%.2f,%.2f) pitch=%.4f (want %.4f) yaw=%.4f (want %.4f)", label, dir.X, dir.Y, dir.Z, pi, math.asin(dir.Y), ya, math.atan2(-dir.X, -dir.Z))) end probe(Vector3.new(1,0,0), "+X") probe(Vector3.new(0,0,1), "+Z") probe(Vector3.new(0,-1,0.001), "down") print("camera restored:", tostring(cam.CFrame.LookVector.Magnitude > 0.99))