local function C(C)dampCam.Goal=-C.CFrame:vectorToObjectSpace(C.RotVelocity)*.1 local h=dampCam:Update()local g=dampRot:Update()g=CFrame.Angles(0,g.X,0)*CFrame.Angles(g.Y,0,0)return(CFrame.Angles(0,0,0)*g)*CFrame.Angles(h.X,h.Y,h.Z)end local function h(C,h)return((C*PIVOT)*h)*OFFSET end
-- ================================================================================
-- LOCAL FUNCTIONS
-- ================================================================================
local function GetCameraRotation(root)
	-- Relative rotational velocity:
	dampCam.Goal = -root.CFrame:vectorToObjectSpace(root.RotVelocity) * 0.1
	local relRotVel = dampCam:Update()

	-- User view rotation:
	local viewRotation = dampRot:Update()
	viewRotation = CFrame.Angles(0, viewRotation.X, 0) * CFrame.Angles(viewRotation.Y, 0, 0)

	return CFrame.Angles(0, 0, 0) * viewRotation * CFrame.Angles(relRotVel.X, relRotVel.Y, relRotVel.Z)
end -- GetCameraRotation

local function GetViewCFrame(view, rotation)
	return view * PIVOT * rotation * OFFSET
end -- GetViewCFrame
