-- Decompiled with the Synapse X Luau decompiler.

local v1 = Vector3.new(1, 0, 0);
local v2 = Vector3.new(0, 1, 0);
local v3 = Vector3.new(0, 0, 1);
local v4 = Vector3.new(1, 0, 1);
local v5 = Vector3.new(0, 0, 0);
local v6 = Vector3.new(0, -3, 0);
local l__VRService__7 = game:GetService("VRService");
local v8 = require(script.Parent:WaitForChild("BaseCamera"));
local v9 = setmetatable({}, v8);
v9.__index = v9;
function v9.new()
	local v10 = setmetatable(v8.new(), v9);
	v10.cameraType = Enum.CameraType.Fixed;
	v10.lastUpdate = tick();
	v10.lastDistanceToSubject = nil;
	return v10;
end;
function v9.GetModuleName(p1)
	return "LegacyCamera";
end;
function v9.Test(p2)
	print("LegacyCamera:Test()");
end;
function v9.SetCameraToSubjectDistance(p3, p4)
	return v8.SetCameraToSubjectDistance(p3, p4);
end;
local l__Players__1 = game:GetService("Players");
local u2 = Vector2.new(0, 0);
local u3 = require(script.Parent:WaitForChild("CameraUtils"));
function v9.Update(p5, p6)
	if not p5.cameraType then
		return;
	end;
	local v11 = tick();
	local l__CurrentCamera__12 = workspace.CurrentCamera;
	local v13 = l__CurrentCamera__12.CFrame;
	local v14 = l__CurrentCamera__12.Focus;
	local l__LocalPlayer__15 = l__Players__1.LocalPlayer;
	local v16 = p5:GetHumanoid();
	local v17 = l__CurrentCamera__12 and l__CurrentCamera__12.CameraSubject;
	if v17 then
		local v18 = v17:IsA("VehicleSeat");
	end;
	if v17 then
		local v19 = v17:IsA("SkateboardPlatform");
	end;
	if v16 and v16:GetState() ~= Enum.HumanoidStateType.Climbing then

	end;
	if p5.lastUpdate == nil or v11 - p5.lastUpdate > 1 then
		p5.lastDistanceToSubject = nil;
	end;
	local v20 = p5:GetSubjectPosition();
	if p5.cameraType == Enum.CameraType.Fixed then
		if p5.lastUpdate then
			p5.rotateInput = p5.rotateInput + p5:UpdateGamepad() * math.min(0.1, v11 - p5.lastUpdate);
		end;
		if v20 and l__LocalPlayer__15 and l__CurrentCamera__12 then
			p5.rotateInput = u2;
			v14 = l__CurrentCamera__12.Focus;
			v13 = CFrame.new(l__CurrentCamera__12.CFrame.p, l__CurrentCamera__12.CFrame.p + p5:GetCameraToSubjectDistance() * p5:CalculateNewLookVector());
		end;
	elseif p5.cameraType == Enum.CameraType.Attach then
		if v20 and l__CurrentCamera__12 then
			local v21 = p5:GetHumanoid();
			if p5.lastUpdate and v21 and v21.RootPart then
				p5.rotateInput = p5.rotateInput + p5:UpdateGamepad() * math.min(0.1, v11 - p5.lastUpdate);
				local v22 = u3.GetAngleBetweenXZVectors(v21.RootPart.CFrame.lookVector, p5:GetCameraLookVector());
				if u3.IsFinite(v22) then
					p5.rotateInput = Vector2.new(v22, p5.rotateInput.Y);
				end;
			end;
			p5.rotateInput = u2;
			v14 = CFrame.new(v20);
			v13 = CFrame.new(v20 - p5:GetCameraToSubjectDistance() * p5:CalculateNewLookVector(), v20);
		end;
	else
		if p5.cameraType ~= Enum.CameraType.Watch then
			return l__CurrentCamera__12.CFrame, l__CurrentCamera__12.Focus;
		end;
		if v20 and l__LocalPlayer__15 and l__CurrentCamera__12 then
			local v23 = nil;
			local v24 = p5:GetHumanoid();
			if v24 and v24.RootPart then
				local v25 = v20 - l__CurrentCamera__12.CFrame.p;
				v23 = v25.unit;
				if p5.lastDistanceToSubject and p5.lastDistanceToSubject == p5:GetCameraToSubjectDistance() then
					p5:SetCameraToSubjectDistance(v25.magnitude);
				end;
			end;
			local v26 = p5:GetCameraToSubjectDistance();
			p5.rotateInput = u2;
			v14 = CFrame.new(v20);
			v13 = CFrame.new(v20 - v26 * p5:CalculateNewLookVector(v23), v20);
			p5.lastDistanceToSubject = v26;
		end;
	end;
	p5.lastUpdate = v11;
	return v13, v14;
end;
return v9;